Code: Show/Hide //in game.h #define PID_NONE -1 #define CB_TURRET "playerturret" typedef void (*PlayerTurret)(Arena *arena, Player *p, int old_attach); //p->p_attached determines attachment/detachment //p->p_attached == PID_NONE if detach //in the case of detachment, old_attach will be the pid of the player detached from //in koth.h #define CB_KOTH "koth" typedef void (*KothWin)(Arena *arena, LinkedList *winners, int points); //the linklist is the one in check_koth(), a list of players that receive KOTH reward |
Code: Show/Hide bounty timer: newbounty, p
do cbs (new bounty, p) p.bountychangecached = 0 # gets called from pppk when pkt.bounty != p.bounty bountychanged: newbounty if p.bountychangecached: newbounty += newbounty - p.bounty else p.bountychangecached = 1 clear bounty timer (p) start bounty timer (newbounty, 10, p) |