weird crashes "fix" (still fixme)
git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@6767 e016b1c5-ed68-44aa-a2f7-31cac88cffde
This commit is contained in:
@@ -98,7 +98,7 @@ template<class T>
|
||||
static inline void sendstring_(const char *text, T &p)
|
||||
{
|
||||
const char *t = text;
|
||||
while(*t) putint(p, *t++);
|
||||
if(t) { while(*t) putint(p, *t++); }
|
||||
putint(p, 0);
|
||||
DEBUGVAR(text);
|
||||
}
|
||||
|
||||
@@ -3998,7 +3998,8 @@ void extinfo_statsbuf(ucharbuf &p, int pid, int bpos, ENetSocket &pongsock, ENet
|
||||
putint(p,clients[i]->clientnum); //add player id
|
||||
putint(p,clients[i]->ping); //Ping
|
||||
sendstring(clients[i]->name,p); //Name
|
||||
sendstring(team_string(clients[i]->team),p); //Team
|
||||
sendstring(team_string(clients[i]->team),p); //Team
|
||||
// "team_string(clients[i]->team)" sometimes return NULL according to RK, causing the server to crash. WTF ?
|
||||
putint(p,clients[i]->state.frags); //Frags
|
||||
putint(p,clients[i]->state.flagscore); //Flagscore
|
||||
putint(p,clients[i]->state.deaths); //Death
|
||||
|
||||
@@ -1619,7 +1619,6 @@ void checkweaponstate()
|
||||
{
|
||||
checkweaponswitch();
|
||||
checkakimbo();
|
||||
playerent *p = (playerent *) camera1;
|
||||
if(!p || !p->weaponsel) return;
|
||||
if(lastmillis - p->weaponsel->reloading > p->weaponsel->info.reloadtime) p->weaponsel->reloading = 0;
|
||||
|
||||
// TODO : here we need to check properly that the spectated player weapon has finished to reload...
|
||||
}
|
||||
Reference in New Issue
Block a user