Score Problems


(FREAK!!!) #1

So, for my mod i want to add a new gametype, which basicly depends on the LMS-gametype. But i want an other score handling.

i want, that the score for killing get saved after each round and not deleted

i thought the answer was in g_main.c

if( g_gametype.integer != GT_WOLF_CAMPAIGN ) {
for ( i=0 ; i< g_maxclients.integer ; i++ ) {
cl = level.clients + i;
if ( cl->pers.connected != CON_CONNECTED ) {
continue;
}
cl->ps.persistant[PERS_SCORE] = 0;
}
}

so i set to hole stuff in /* */
But nothing chances…

am i on the wrong way?


(Rain) #2

No state is kept within qagame at all when a map_restart happens. The module is unloaded and reloaded entirely.

To work around this, campaign info (etc.) is stuffed into cvars (see g_session.c) on unload, and read from those cvars when qagame is reloaded.