Dr Brain wrote: |
Just an idea (haven't looked at the code): pass the params from ?startgame to the module. Then they can parse out the # of kills (or whatever) if they want to. |
Hakaku wrote: |
I look forward to seeing more events or examples added. |
D1st0rt wrote: |
Are there any specific examples of events people would like to see implemented? In addition to promoting the system it will help me find any problems that may exist. |
Quote: |
Are the regions pretty reliable? Like is it possible for someone to just, lag-jump over a region completely? Or if someone goes from one side of the region to the other they still trigger the region_enter / region_leave events? |
Code: Show/Hide I <arenaman> {0} [Samapico] entering arena D <arenaman> {f1racetest} arena being destroyed W <hgcore> {f1racetest} Ignored trying to end game that is already in POSTGAME or IDLE I <hgcore> {f1racetest} Detached hosted game. E <module> {f1racetest} failed to detach 'hg_race' while detaching modules E <module> {f1racetest} failed to detach 'hgcore' while detaching modules E <arenaman> {f1racetest} failed to detach modules from arena, arena will not be destroyed. check for correct interface releasing. E <arenaman> {#foof1racetest} WARNING: the server is no longer in a stable state because of this error. your modules need to be fixed. |
Code: Show/Hide else if (action == MM_DETACH) { //Data hgcore_adata *ad = P_ARENA_DATA(arena, adkey); if(ad->Status != HGS_IDLE) { CleanupGame(arena); } pthread_mutex_lock(&globalmutex); LLFree(ad->Teams); HashFree(ad->Players); pthread_mutex_unlock(&globalmutex); afree(ad->cfg_AllowedGames); //Timers //Callbacks mm->UnregCallback(CB_PLAYERACTION, PlayerAction, arena); mm->UnregCallback(CB_SHIPCHANGE, ShipChange, arena); mm->UnregCallback(CB_FREQCHANGE, FreqChange, arena); mm->UnregCallback(CB_ARENAACTION, ArenaAction, arena); //Commands cmd->RemoveCommand("newgame", C_newgame, arena); cmd->RemoveCommand("addteam", C_addteam, arena); cmd->RemoveCommand("removeteam", C_removeteam, arena); cmd->RemoveCommand("showteams", C_showteams, arena); cmd->RemoveCommand("startgame", C_startgame, arena); cmd->RemoveCommand("stopgame", C_stopgame, arena); cmd->RemoveCommand("listgames", C_listgames, arena); cmd->RemoveCommand("switchgame", C_switchgame, arena); cmd->RemoveCommand("pausegame", C_pausegame, arena); cmd->RemoveCommand("resumegame", C_resumegame, arena); //SHOULD RETURN MM_OK HERE } else if (action == MM_PREUNLOAD) //server is shutting down { Link *link; Arena *a; aman->Lock(); FOR_EACH_ARENA(a) { EndGame(a, HGR_FORCED); DetachGame(a); } aman->Unlock(); //SHOULD RETURN MM_OK HERE } return MM_FAIL; |
Code: Show/Hide else if (action == MM_DETACH)
{ //Data lm->Log(L_INFO, "Detaching hg_race"); aman->Lock(); hg_race_adata *ad = P_ARENA_DATA(arena, adkey); if (ad) { ad->cp_count = 0; if (ad->checkpoints) afree(ad->checkpoints); ad->checkpoints = NULL; ad->pit_count = 0; if (ad->pitlane) afree(ad->pitlane); ad->pitlane = NULL; } aman->Unlock(); //Timers lm->Log(L_INFO, "Unregistering callbacks..."); //Callbacks mm->UnregCallback(CB_PPK, PlayerMove, arena); mm->UnregCallback(CB_PLAYERACTION, PlayerAction, arena); //Commands lm->Log(L_INFO, "Detaching game from hgcore..."); // Interface registration if(!hgcore->DetachGame(arena)) { return MM_FAIL; } lm->Log(L_INFO, "Unregistering interface..."); if (mm->UnregInterface(&hginterface, arena)) { return MM_FAIL; } lm->Log(L_INFO, "Detach OK!"); return MM_OK; |
Code: Show/Hide D <arenaman> {f1racetest} arena being destroyed W <hgcore> {f1racetest} Ignored trying to end game that is already in POSTGAME or IDLE I <hgcore> {f1racetest} Detached hosted game. I Detaching hg_race I Unregistering callbacks... I Detaching game from hgcore... E <module> {f1racetest} failed to detach 'hg_race' while detaching modules E <arenaman> {f1racetest} failed to detach modules from arena, arena will not be destroyed. check for correct interface releasing. E <arenaman> {#foof1racetest} WARNING: the server is no longer in a stable state because of this error. your modules need to be fixed. I <arenaman> {0} [Samapico] leaving arena |
Code: Show/Hide else if(!ad->hg)
{ lm->LogA(L_WARN, "hgcore", a, "Ignored detaching hosted game that is already detached."); } |