]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/common/gamemodes/gamemode/keyhunt/sv_keyhunt.qc
Tidy up classnames
[xonotic/xonotic-data.pk3dir.git] / qcsrc / common / gamemodes / gamemode / keyhunt / sv_keyhunt.qc
index d48c76f3943313648aa1a4f39743a3b42845efff..1c2eacffd4e4974932096d27c07c8cd5b2de3a4e 100644 (file)
@@ -717,12 +717,10 @@ void key_reset(entity this)
        kh_Key_Remove(this);
 }
 
-const string STR_ITEM_KH_KEY = "item_kh_key";
 void kh_Key_Spawn(entity initial_owner, float _angle, float i)  // runs every time a new flag is created, ie after all the keys have been collected
 {
-       entity key = spawn();
+       entity key = new(item_kh_key);
        key.count = i;
-       key.classname = STR_ITEM_KH_KEY;
        settouch(key, kh_Key_Touch);
        setthink(key, kh_Key_Think);
        key.nextthink = time;
@@ -983,7 +981,7 @@ void kh_Initialize()  // sets up th KH environment
        kh_teams = BITS(bound(2, kh_teams, 4));
 
        // make a KH entity for controlling the game
-       kh_controller = spawn();
+       kh_controller = new(kh_controller);
        setthink(kh_controller, kh_Controller_Think);
        kh_Controller_SetThink(0, kh_WaitForPlayers);