]> git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Consolidate ifdefs in powerup headers
authorbones_was_here <bones_was_here@xa.org.au>
Tue, 20 Jul 2021 06:45:15 +0000 (16:45 +1000)
committerbones_was_here <bones_was_here@xa.org.au>
Tue, 20 Jul 2021 06:45:15 +0000 (16:45 +1000)
qcsrc/common/mutators/mutator/powerups/powerup/invisibility.qh
qcsrc/common/mutators/mutator/powerups/powerup/shield.qh
qcsrc/common/mutators/mutator/powerups/powerup/speed.qh
qcsrc/common/mutators/mutator/powerups/powerup/strength.qh

index a0d1d76557eeba7ea65555c034a8c241a11ba8d8..24bda9cd44ae0ade7aeca1ef884bcc3bf8936004 100644 (file)
@@ -32,10 +32,12 @@ REGISTER_ITEM(Invisibility, Powerup) {
         this.spawnflags = ITEM_FLAG_NORMAL;
     else
         this.spawnflags = ITEM_FLAG_MUTATORBLOCKED;
+
+    this.m_iteminit         =   powerup_invisibility_init;
 #endif
 #ifdef GAMEQC
-//    this.m_model            =   MDL_Invisibility_ITEM; // TODO: new model required
-    this.m_model            =   MDL_BUFF;
+    this.m_itemid           =   IT_INVISIBILITY;
+    this.m_model            =   MDL_BUFF; // TODO: MDL_Invisibility_ITEM when new model available
     this.m_skin             =   12;
     this.m_sound            =   SND_Invisibility;
     this.m_glow             =   true;
@@ -47,12 +49,6 @@ REGISTER_ITEM(Invisibility, Powerup) {
     this.m_color            =   '0.5 0.5 1';
     this.m_waypoint         =   _("Invisibility");
     this.m_waypointblink    =   2;
-#ifdef GAMEQC
-    this.m_itemid           =   IT_INVISIBILITY;
-#endif
-#ifdef SVQC
-    this.m_iteminit         =   powerup_invisibility_init;
-#endif
 }
 
 SPAWNFUNC_ITEM(item_invisibility, ITEM_Invisibility)
index 4267889ac14537ac1204658a4c9415f60bb35f4d..3e482d053aa57099c00ba0270e75f9c2384fc782 100644 (file)
@@ -31,8 +31,11 @@ REGISTER_ITEM(Shield, Powerup) {
         this.spawnflags = ITEM_FLAG_NORMAL;
     else
         this.spawnflags = ITEM_FLAG_MUTATORBLOCKED;
+
+    this.m_iteminit         =   powerup_shield_init;
 #endif
 #ifdef GAMEQC
+    this.m_itemid           =   IT_INVINCIBLE;
     this.m_model            =   MDL_Shield_ITEM;
     this.m_sound            =   SND_Shield;
     this.m_glow             =   true;
@@ -44,12 +47,6 @@ REGISTER_ITEM(Shield, Powerup) {
     this.m_color            =   '1 0 1';
     this.m_waypoint         =   _("Shield");
     this.m_waypointblink    =   2;
-#ifdef GAMEQC
-    this.m_itemid           =   IT_INVINCIBLE;
-#endif
-#ifdef SVQC
-    this.m_iteminit         =   powerup_shield_init;
-#endif
 }
 
 SPAWNFUNC_ITEM(item_shield, ITEM_Shield)
index 6b127e39f8355d1265b806e7508eac0f6d9cd830..4bdfe32109df6cb60686e32cb1ddfae3b6fd1770 100644 (file)
@@ -33,10 +33,12 @@ REGISTER_ITEM(Speed, Powerup) {
         this.spawnflags = ITEM_FLAG_NORMAL;
     else
         this.spawnflags = ITEM_FLAG_MUTATORBLOCKED;
+
+    this.m_iteminit         =   powerup_speed_init;
 #endif
 #ifdef GAMEQC
-//    this.m_model            =   MDL_Speed_ITEM; // TODO: new model required
-    this.m_model            =   MDL_BUFF;
+    this.m_itemid           =   IT_SPEED;
+    this.m_model            =   MDL_BUFF; // TODO: MDL_Speed_ITEM when new model available
     this.m_skin             =   9;
     this.m_sound            =   SND_Speed;
     this.m_glow             =   true;
@@ -48,12 +50,6 @@ REGISTER_ITEM(Speed, Powerup) {
     this.m_color            =   '0.1 1 0.84';
     this.m_waypoint         =   _("Speed");
     this.m_waypointblink    =   2;
-#ifdef GAMEQC
-    this.m_itemid           =   IT_SPEED;
-#endif
-#ifdef SVQC
-    this.m_iteminit         =   powerup_speed_init;
-#endif
 }
 
 SPAWNFUNC_ITEM(item_speed, ITEM_Speed)
index 81d939e673e32ff13a4c9b9e63401cbe51209fe2..8d25bfb9087c4bb85071ef8ed3d69053a8e45d25 100644 (file)
@@ -33,8 +33,11 @@ REGISTER_ITEM(Strength, Powerup) {
         this.spawnflags = ITEM_FLAG_NORMAL;
     else
         this.spawnflags = ITEM_FLAG_MUTATORBLOCKED;
+
+    this.m_iteminit         =   powerup_strength_init;
 #endif
 #ifdef GAMEQC
+    this.m_itemid           =   IT_STRENGTH;
     this.m_model            =   MDL_Strength_ITEM;
     this.m_sound            =   SND_Strength;
     this.m_glow             =   true;
@@ -46,12 +49,6 @@ REGISTER_ITEM(Strength, Powerup) {
     this.m_color            =   '0 0 1';
     this.m_waypoint         =   _("Strength");
     this.m_waypointblink    =   2;
-#ifdef GAMEQC
-    this.m_itemid           =   IT_STRENGTH;
-#endif
-#ifdef SVQC
-    this.m_iteminit         =   powerup_strength_init;
-#endif
 }
 
 SPAWNFUNC_ITEM(item_strength, ITEM_Strength)