kh_controller.nextthink = time; // force
}
void kh_WaitForPlayers();
-void kh_Controller_Think() // called a lot
-{SELFPARAM();
+void kh_Controller_Think(entity this) // called a lot
+{
if(intermission_running)
return;
if(self.cnt > 0)
- { if(self.think != kh_WaitForPlayers) { self.cnt -= 1; } }
+ { if(getthink(self) != kh_WaitForPlayers) { self.cnt -= 1; } }
else if(self.cnt == 0)
{
self.cnt -= 1;
kh_Key_AssignTo(key, player); // this also updates .kh_state
}
-void kh_Key_Touch() // runs many, many times when a key has been dropped and can be picked up
-{SELFPARAM();
+void kh_Key_Touch(entity this) // runs many, many times when a key has been dropped and can be picked up
+{
if(intermission_running)
return;
kh_FinishRound();
}
-void kh_Key_Think() // runs all the time
-{SELFPARAM();
+void kh_Key_Think(entity this) // runs all the time
+{
if(intermission_running)
return;
key.count = i;
key.classname = STR_ITEM_KH_KEY;
settouch(key, kh_Key_Touch);
- key.think = kh_Key_Think;
+ setthink(key, kh_Key_Think);
key.nextthink = time;
key.items = IT_KEY1 | IT_KEY2;
key.cnt = _angle;
// make a KH entity for controlling the game
kh_controller = spawn();
- kh_controller.think = kh_Controller_Think;
+ setthink(kh_controller, kh_Controller_Think);
kh_Controller_SetThink(0, kh_WaitForPlayers);
setmodel(kh_controller, MDL_KH_KEY);