[Opentnl-cvs] tnl/zap CTFGame.cpp,1.10,1.11 gameType.cpp,1.10,1.11
Brought to you by:
mark_frohnmayer,
s_alanet
From: Ben G. <s_a...@us...> - 2004-04-23 07:02:35
|
Update of /cvsroot/opentnl/tnl/zap In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv2846/zap Modified Files: CTFGame.cpp gameType.cpp Log Message: Fixed various crash situations. Index: gameType.cpp =================================================================== RCS file: /cvsroot/opentnl/tnl/zap/gameType.cpp,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -d -r1.10 -r1.11 *** gameType.cpp 23 Apr 2004 02:14:29 -0000 1.10 --- gameType.cpp 23 Apr 2004 07:02:26 -0000 1.11 *************** *** 51,55 **** { for(S32 i = 0; i < mClientList.size(); i++) ! mClientList[i].ping = (U32) mClientList[i].clientConnection->getRoundTripTime(); for(S32 i = 0; i < mClientList.size(); i++) --- 51,56 ---- { for(S32 i = 0; i < mClientList.size(); i++) ! if(mClientList[i].clientConnection) ! mClientList[i].ping = (U32) mClientList[i].clientConnection->getRoundTripTime(); for(S32 i = 0; i < mClientList.size(); i++) Index: CTFGame.cpp =================================================================== RCS file: /cvsroot/opentnl/tnl/zap/CTFGame.cpp,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -d -r1.10 -r1.11 *** CTFGame.cpp 23 Apr 2004 02:14:29 -0000 1.10 --- CTFGame.cpp 23 Apr 2004 07:02:25 -0000 1.11 *************** *** 265,270 **** bool CTFGameType::objectCanDamageObject(GameObject *damager, GameObject *victim) { ! GameConnection *c1 = damager->getControllingClient(); ! GameConnection *c2 = victim->getControllingClient(); if(!c1 || !c2) --- 265,270 ---- bool CTFGameType::objectCanDamageObject(GameObject *damager, GameObject *victim) { ! GameConnection *c1 = (damager ? damager->getControllingClient() : NULL); ! GameConnection *c2 = (victim ? victim->getControllingClient() : NULL); if(!c1 || !c2) |