Skip to content

Commit

Permalink
zPAM3.22
Browse files Browse the repository at this point in the history
Bugs fixed:
[3.3.18] Quick menu settings - settings for 'Show enemy list' was not 
correctly saved - fixed
[3.3.29] Score changing via menu - fixed issue when score is changed to 
halftime state (for example 10:2 in cg_mr12) - halftime was then called 
again -> fixed

News:
[3.3.42] Players left - when last player in team is killed, text "Allies 
Eliminated" / "Axis Eliminated" is showed
(this change was already in zPAM3.20 - i forgot to write it to the 
change list)
[3.3.43] When you hit your teammate, reddish hit mark is showed
Added text warning on screen to select a team when you ESC welcome 
(server info) menu

Update of existing:
[3.3.32] New damage feedback for assists - text "assist" is showed 
instead of hit mark
[3.3.41] When 5min timer expires between maps / halfs, warning text is 
showed for better indication that one team ready will skip the readyup
[3.3.42] Players left - when some player were killed, "bouncy" animation 
was used for text. Its removed now because the number sometimes 
incomprehensibly moved all over the screen
[3.3.42] Players left - when last player in team is killed, text "Allies 
Eliminated" / "Axis Eliminated" is now showed in red color.
[3.3.10] Match info - improved detection of new match with different 
team
[3.3.2] Auto-recording - ensuring my team name is always first in demo 
name
[3.3.17] Scoreboard menu - when final scoreboard is showed, players 
names are showed with colors now
  • Loading branch information
eyza-cod2 committed Jul 15, 2021
1 parent f0bea94 commit 53e1a8e
Show file tree
Hide file tree
Showing 24 changed files with 491 additions and 323 deletions.
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@ gsc_changes.txt
zpam_changes.txt
what_to_test.txt
source_compiled
/zpam321.iwd
/*.iwd
89 changes: 75 additions & 14 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Introduction

Mod zPAM3.21 is new version of PAM mode for COD2.<br>
Mod zPAM3.22 is new version of PAM mode for COD2.<br>

The code form previous zPAM 2.07 version is completely rewritten and ported to new code base, which helped in the implementation of new features and bug fixes.

Expand All @@ -9,10 +9,12 @@ Work on this pam was iniciated by me in 2015 a was not never fully finished. In

## Download
- Actual version:
- 2021/05/16 - <b><a href="https://github.com/eyza-cod2/zpam3/raw/master/zpam321.zip">zPAM 3.21</a></b>
- 2021/07/15 - <b><a href="https://github.com/eyza-cod2/zpam3/raw/master/zpam322.zip">zPAM 3.22</a></b>


- Previous versions:

- 2021/05/16 - <b><a href="https://github.com/eyza-cod2/zpam3/tree/f0bea94f83791c4a756909963101bfd9d340757f">zPAM 3.21</a></b>
- 2021/05/05 - <b><a href="https://github.com/eyza-cod2/zpam3/tree/c7d5fa259e6e21a7fc510847421fab5338f19d0d">zPAM 3.20</a></b>
- 2021/01/05 - <b><a href="https://github.com/eyza-cod2/zpam3/tree/a365aa9d884f87a368e51879b016157b431ee449">zPAM 3.1 BETA 6</a></b></b>
- 2020/11/29 - <b><a href="https://github.com/eyza-cod2/zpam3/tree/b3e8711b13b493134ec1c762aeba17399eefb95d">zPAM 3.1 BETA 5</a></b></b>
Expand All @@ -23,6 +25,37 @@ Work on this pam was iniciated by me in 2015 a was not never fully finished. In


## Changelog
<details><summary>zPAM 3.22 changes (click to open)</summary>
<p>

#### Bugs fixed:
- [3.3.18] Quick menu settings - settings for 'Show enemy list' was not correctly saved - fixed
- [3.3.29] Score changing via menu - fixed issue when score is changed to halftime state (for example 10:2 in cg_mr12) - halftime was then called again -> fixed

#### News:
- [3.3.42] Players left - when last player in team is killed, text "Allies Eliminated" / "Axis Eliminated" is showed
(this change was already in zPAM3.20 - i forgot to write it to the change list)
- [3.3.43] When you hit your teammate, reddish hit mark is showed<br>
<img src="/images/team_hit.png" height="200" />
- Added text warning on screen to select a team when you ESC welcome (server info) menu

#### Update of existing:
- [3.3.32] New damage feedback for assists - text "assist" is showed instead of hit mark <br>
<img src="/images/assist.png" height="200" />
- [3.3.41] When 5min timer expires between maps / halfs, warning text is showed for better indication that one team ready will skip the readyup<br>
<img src="/images/auto_readyup.png" height="200" />
- [3.3.42] Players left - when some player were killed, "bouncy" animation was used for text. Its removed now because the number sometimes incomprehensibly moved all over the screen
- [3.3.42] Players left - when last player in team is killed, text "Allies Eliminated" / "Axis Eliminated" is now showed in red color.
- [3.3.10] Match info - improved detection of new match with different team
- [3.3.2] Auto-recording - ensuring my team name is always first in demo name
- [3.3.17] Scoreboard menu - when final scoreboard is showed, players names are showed with colors now
</p>
</details>





<details><summary>zPAM 3.21 changes (click to open)</summary>
<p>

Expand All @@ -37,6 +70,8 @@ Work on this pam was iniciated by me in 2015 a was not never fully finished. In
</details>




<details><summary>zPAM 3.20 changes (click to open)</summary>
<p>

Expand Down Expand Up @@ -87,33 +122,54 @@ r_polygonOffsetScale and r_polygonOffsetBias warning appears even if they were c


## Installation
- Download <b><a href="https://github.com/eyza-cod2/zpam3/raw/master/zpam321.zip">zPAM 3.21</a></b> and extract folders with files into following locations:
- Download <b><a href="https://github.com/eyza-cod2/zpam3/raw/master/zpam322.zip">zPAM 3.22</a></b> and extract folders with files into following locations:
- ./pb/pbsvuser.cfg
- ./main/zpam321.iwd
- ./main/zpam322.iwd
- ./main/mp_toujane_fix_v2.iwd
- ./main/mp_burgundy_fix_v1.iwd
- ./main/server.cfg
- ./main/public.cfg


- Add ```+exec server.cfg``` into command line arguments and edit the *server.cfg* file to configure your server
- If you are running public server, add ```+exec public.cfg``` into command line arguments and edit the *public.cfg* file to configure your public server
- If you use these .cfg files, make sure no other .cfg files are executed!


- Notes:
- When your server is runned, you may get an error message saying "PAM is not installed correctly". To fix this error, follow instructions in [Troubleshooting](#troubleshooting) section
- <i>mp_toujane_fix_v2.iwd</i> and <i>mp_burgundy_fix_v1.iwd</i> are fixed version of original maps - these files needs to be included with PAM, more info in [Questions & Answers](#questions--answers) section
- Toujane FIX changes: https://github.com/eyza-cod2/mp_toujane_fix
- Burgundy FIX changes: https://github.com/eyza-cod2/mp_burgundy_fix.
- <i>server.cfg</i> - exec this file for fast server configuration and in case you are running a public server (+exec server)
- you have to enable downloading via cvar <i>sv_wwwDownload 1</i> and specify a download url via cvar <i>sv_wwwBaseURL "url"</i>; if you dont have any, you can use <i>sv_wwwBaseURL "http://cod2x.me/zpam321"</i> (this is to make sure fixed maps are downloaded in fast way for players)
- Burgundy FIX changes: https://github.com/eyza-cod2/mp_burgundy_fix
- you have to enable downloading via cvar <i>sv_wwwDownload 1</i> and specify a download url via cvar <i>sv_wwwBaseURL "url"</i>; if you dont have any, you can use <i>sv_wwwBaseURL "http://cod2x.me/zpam322"</i> (this is to make sure fixed maps are downloaded in fast way for players)


## Contact
Write message on discord <b>LetsPlay Europe</b> in <b>#cod2-zpam-3</b> channel.<br>
Or add me on discord <b>eyza#7930</b><br>
Or write me on email <b>[email protected]</b><br>
<br>
Supporters: askeslav, tomik, cokY, Sk1lzZ, YctN, kebit, foxbuster, <==Mustang==>Clan from Hungary, hubertgruber / dutch, excel
<br><br>
Please support this work on my Paypal -> https://paypal.me/kratasy
<br>

## Supporters

**askeslav, tomik, lampy**<br>
Big thanks for consulting and testing

**YctN** (discord: FGH - YctN#1140)<br>
Big thanks for server support, hosting and fixed maps consulting

**Stendby** (discord: Stendby#3298)<br>
Big thanks for fixed maps

**mtN** (discord: mtN#8249)<br>
Big thanks for PAM promoting

**Other supporters:**<br>
cokY, Sk1lzZ, YctN, kebit, foxbuster, <==Mustang==>Clan from Hungary, hubertgruber / dutch, excel, shady


<br><br>

## Questions & Answers
Expand Down Expand Up @@ -335,8 +391,8 @@ Example: "autorecording_1|matchinfo_1|score_0|playersleft_1"

## Troubleshooting
### Error "zPAM is not installed correctly"
#### Iwd file zpam321.iwd must be installed in main folder. (fs_game)
- From version 3.21, all iwd files have to be installed in main folder.
#### Iwd file zpam322.iwd must be installed in main folder. (fs_game)
- From version 3.20, all iwd files have to be installed in main folder.
This is because of bug that cvars / settings changed in game are not saved into the config when running a game with fs_game set.
Make sure cvar /fs_game is empty and iwd files are placed in main folder.

Expand All @@ -348,7 +404,7 @@ Make sure cvar /fs_game is empty and iwd files are placed in main folder.

#### WWW downloading must be enabled. Set sv_wwwDownload and sv_wwwBaseURL
- You have to enable www downloading via cvar /sv_wwwDownload 1 and specify a download url via cvar /sv_wwwBaseURL "url".
- If you dont have any url, you can use /sv_wwwBaseURL "http://cod2x.me/zpam321"
- If you dont have any url, you can use /sv_wwwBaseURL "http://cod2x.me/zpam322"
- This is to make sure fixed maps are downloaded in fast way for players

#### Old pam / maps detected in main folder. Delete iwd file you see above.
Expand Down Expand Up @@ -566,7 +622,8 @@ Added posibility to call bash mode from menu.<br>
[3.3.29] Score changing via menu - in first readyup, you can change a score of teams (in case wrong pam_mode was set, server crash, etc..)<br>
[3.3.30] New spectating system - new UI, auto-spectator is now better, score stats, player progress stats, etc..<br>
[3.3.31] Round report - at the end of the round info about kills and hits you made are printed<br>
[3.3.32] New damage feedback for assists - when player damaged by you is killed, damage feedback cross is showed<br>
[3.3.32] New damage feedback for assists - when player damaged by you is killed, "assist" text is showed on screen<br>
<img src="/images/assist.png" /><br>
[3.3.33] Players left - new player names list of alive enemy players above players left counter (can be turned off via menu)<br>
[3.3.34] In readyup, you can throw nades like in strat mode<br>
[3.3.35] New custom settings for map mode in rcon menu - a few of the settings can be changed (for example shotgun rebalance, fast-reload fix) and this change stays applied in next maps<br>
Expand All @@ -577,8 +634,12 @@ Added posibility to call bash mode from menu.<br>
[3.3.38] Score in left-top corner can by enabled via settings menu<br>
[3.3.39] For future hit diagnostics, at the end of each round info about hits is saved to cvar pam_damage_debug<br>
[3.3.40] Hitbox rebalance - if you fire from rifle or scope to left arm at +-20* degress, it will be changed to kill to body<br>
[3.3.41] In halftime-readyup and between map readyup, when 5min timer expire, red timer is showed. If all players from 1 team are ready, match automatically start even if opponent team is not ready.<br>
[3.3.41] In halftime-readyup and between map readyup, when 5min timer expire, warning and red timer is showed. If all players from 1 team are ready, match automatically start even if opponent team is not ready.<br>
<a href="/images/auto_readyup.png"> <img src="/images/auto_readyup.png" /> </a><br>
[3.3.42] Players left - when last player in team is killed, text "Allies Eliminated" / "Axis Eliminated" is showed<br>
[3.3.43] When you hit your teammate, reddish hit mark is showed<br>
<img src="/images/team_hit.png" /><br>-


</sub>

Expand Down
Binary file added images/assist.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified images/auto_readyup.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/team_hit.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion source/maps/mp/gametypes/_callbacksetup.gsc
Original file line number Diff line number Diff line change
Expand Up @@ -343,7 +343,7 @@ CodeCallback_PlayerDamage(eInflictor, eAttacker, iDamage, iDFlags, sMeansOfDeath
{
//eAttacker iprintln("^6DMG feedback" + i);
if(isPlayer(eAttacker) && eAttacker != self && !(iDFlags & level.iDFLAGS_NO_PROTECTION))
eAttacker thread maps\mp\gametypes\_damagefeedback::updateDamageFeedback();
eAttacker thread maps\mp\gametypes\_damagefeedback::updateDamageFeedback(self);
}

//println("##################### " + "notifyDamage");
Expand Down
31 changes: 26 additions & 5 deletions source/maps/mp/gametypes/_damagefeedback.gsc
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ init()
{
precacheShader("damage_feedback");
precacheRumble("damage_heavy");

precacheString2("STRING_ASSIST", &"assist");
}
}

Expand All @@ -25,7 +27,7 @@ onCvarChanged(cvar, value, isRegisterTime)
return false;
}

updateDamageFeedback()
updateDamageFeedback(enemy)
{
if (level.scr_show_hitblip)
{
Expand All @@ -43,6 +45,11 @@ updateDamageFeedback()
self.hud_damagefeedback setShader("damage_feedback", 24, 24);
}

color = (1,1,1);
if (isPlayer(enemy) && level.gametype == "sd" && !level.in_readyup && enemy.pers["team"] == self.pers["team"])
color = (1,0.5,0.5);

self.hud_damagefeedback.color = color;
self.hud_damagefeedback.alpha = 1;
self.hud_damagefeedback fadeOverTime(1);
self.hud_damagefeedback.alpha = 0;
Expand All @@ -56,11 +63,25 @@ updateAssistsFeedback()
{
if (level.scr_show_hitblip)
{
if(isPlayer(self) && isDefined(self.hud_damagefeedback))
if(isPlayer(self))
{
self.hud_damagefeedback.alpha = 0.5;
self.hud_damagefeedback fadeOverTime(0.6);
self.hud_damagefeedback.alpha = 0;
if (!isDefined(self.hud_assistfeedback))
{
self.hud_assistfeedback = newClientHudElem2(self);
self.hud_assistfeedback.horzAlign = "center";
self.hud_assistfeedback.vertAlign = "middle";
self.hud_assistfeedback.x = 0;
self.hud_assistfeedback.y = 20;
self.hud_assistfeedback.alpha = 0;
self.hud_assistfeedback.archived = true;
self.hud_assistfeedback.color = (1,1,1);
self.hud_assistfeedback.fontSize = 1.1;
self.hud_assistfeedback setText(game["STRING_ASSIST"]);
}

self.hud_assistfeedback.alpha = 1;
self.hud_assistfeedback fadeOverTime(1.3);
self.hud_assistfeedback.alpha = 0;
}
}
}
30 changes: 21 additions & 9 deletions source/maps/mp/gametypes/_matchinfo.gsc
Original file line number Diff line number Diff line change
Expand Up @@ -385,7 +385,9 @@ resetAll()

waitForPlayerOrClear(playersLast)
{
wait level.fps_multiplier * 25;
wait level.fps_multiplier * 15;

resetCount = 0;

for(;;)
{
Expand All @@ -396,6 +398,12 @@ waitForPlayerOrClear(playersLast)
// reset matchinfo if 30% of players disconnect or there are no players or there was no players last map
players = getentarray("player", "classname");
if (((players.size * 1.0) < (playersLast * 0.7)) || ((players.size * 1.0) > (playersLast * 1.2)) || players.size <= 1 || playersLast <= 1)
resetCount++;
else
resetCount = 0;

// We are sure to reset the match info
if (resetCount >= 4)
{
clear();
iprintln("Info about teams was cleared.");
Expand Down Expand Up @@ -667,7 +675,7 @@ refresh()
if (playersLast != "")
{
level thread waitForPlayerOrClear(int(playersLast));
setcvar("sv_map_players", "");
//setcvar("sv_map_players", "");
}

// Save previous time left
Expand Down Expand Up @@ -765,6 +773,17 @@ refresh()
setCvarIfChanged("sv_map_totaltime", game["match_totaltime"]);


// Update number of players in first round (and second update only of its higher due to missing player in first round)
// If number of players change, matchinfo is reseted next map due to different number of players
if (game["match_teams_set"])
{
savedPlayers = GetCvarInt("sv_map_players"); // GetCvarInt return 0 if cvar is empty string
players = getentarray("player", "classname");

if (savedPlayers == 0 || (game["round"] == 2 && players.size > savedPlayers))
setCvarIfChanged("sv_map_players", players.size);
}


// Total time
if (game["match_totaltime"] > 0)
Expand Down Expand Up @@ -823,13 +842,6 @@ refresh()

setCvarIfChanged("sv_map_score", (game["match_team1_score_beforeOvertime"] + team1add) + " : " + (game["match_team2_score_beforeOvertime"] + team2add) + " OT");
}

// Update number of player in this match
// Update this value only if it increases - avoid decreasing it for case when players disconnect in the middle of the match
// so next time map restart the info about match is properly reseted due to low number of players
players = getentarray("player", "classname");
if (players.size > GetCvarInt("sv_map_players"))
setCvarIfChanged("sv_map_players", players.size);
}

// Global server cvars visible via HLSW
Expand Down
10 changes: 9 additions & 1 deletion source/maps/mp/gametypes/_menu_scoreboard.gsc
Original file line number Diff line number Diff line change
Expand Up @@ -196,7 +196,15 @@ addLine(player, name, score, kills, deaths, assists, damages, plants, defuses)
self.scoreboard.names += "^4"; // blue
}

if (isDefined(name)) self.scoreboard.names += removeColorsFromString(name);


if (isDefined(name))
{
// In final scoreboard show name colors, otherwise dont
if (game["state"] != "intermission")
name = removeColorsFromString(name);
self.scoreboard.names += name;
}
if (isDefined(score)) self.scoreboard.scores += score;
if (isDefined(kills)) self.scoreboard.kills += kills;
if (isDefined(deaths)) self.scoreboard.deaths += deaths;
Expand Down
2 changes: 1 addition & 1 deletion source/maps/mp/gametypes/_pam.gsc
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ init()
{
if(game["firstInit"])
{
precacheString2("STRING_VERSION_INFO", &"zPAM 3.21"); // ZPAM_RENAME
precacheString2("STRING_VERSION_INFO", &"zPAM 3.22"); // ZPAM_RENAME
}
}

Expand Down
Loading

0 comments on commit 53e1a8e

Please sign in to comment.