• R/O
  • SSH

zandronum-zdoom-sync: Commit


Commit MetaInfo

Revisionbed13a5d349800a8049e2aa25c3e0e2be9d60a3c (tree)
Time2007-07-16 03:27:22
AuthorBenjamin Berkels <torr.samaho@quan...>
CommiterBenjamin Berkels

Log Message

Fixed: ACS function GiveInventory doesn't tell the correct inventory amount to a client.

SVN r385 (trunk)

Change Summary

Incremental Difference

diff -r bada46eb7d13 -r bed13a5d3498 docs/Skulltag Version History.txt
--- a/docs/Skulltag Version History.txt Sun Jul 15 17:51:06 2007 +0000
+++ b/docs/Skulltag Version History.txt Sun Jul 15 18:27:22 2007 +0000
@@ -71,6 +71,7 @@
7171 - - Fixed: User info is in some cases not updated to the server properly on connect, if it was changed when not connected to a server. [Torr Samaho]
7272 - - Fixed: A few strings in error messages were referring to ZDoom instead of Skulltag. [Torr Samaho]
7373 - - Fixed: ST crashes if a bot is spawned outside a map. Although bots should not be spawned there, ST should not crash in case such a thing happens. [Torr Samaho]
74+- - Fixed: ACS function GiveInventory doesn't tell the correct inventory amount to a client. [Torr Samaho]
7475 - - IDESE: Changed server gametype setup: "+gametype 1" in .rsp file. This fixes that some dmflags were not respected in some gametypes. [Bond]
7576 - - IDESE: Fixed a problem with bot names (prevented to add bot>6). [Bond]
7677 ! - Changed the "enemy" to an "ally" icon that displays over your allies in team games. [Carnevil]
diff -r bada46eb7d13 -r bed13a5d3498 src/p_acs.cpp
--- a/src/p_acs.cpp Sun Jul 15 17:51:06 2007 +0000
+++ b/src/p_acs.cpp Sun Jul 15 18:27:22 2007 +0000
@@ -241,6 +241,18 @@
241241 actor->player->PendingWeapon = savedPendingWeap;
242242 }
243243
244+ // [BB] Since SERVERCOMMANDS_GiveInventory overwrites the item amount
245+ // of the client with item->Amount, we have have to set this to the
246+ // correct amount the player has.
247+ AInventory *pInventory = NULL;
248+ if( actor->player )
249+ {
250+ if ( actor->player->mo )
251+ pInventory = actor->player->mo->FindInventory( info );
252+ }
253+ if ( pInventory != NULL && item != NULL )
254+ item->Amount = pInventory->Amount;
255+
244256 // [BC] If we're the server, give the item to clients.
245257 if (( NETWORK_GetState( ) == NETSTATE_SERVER ) && ( actor->player ) && ( item ))
246258 SERVERCOMMANDS_GiveInventory( actor->player - players, item );
Show on old repository browser