]> git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/common/weapons/w_tuba.qc
Clean up macros
[xonotic/xonotic-data.pk3dir.git] / qcsrc / common / weapons / w_tuba.qc
index 92bdf4f8f99019e8f17eaf8d38bc640b8ed11c7d..54959949a746024e406f5567b3355a103e3cb75b 100644 (file)
@@ -60,22 +60,22 @@ float W_Tuba_HasPlayed(entity pl, string melody, float instrument, float ignorep
        float i, j, mmin, mmax, nolength;
        float n = tokenize_console(melody);
        if(n > pl.tuba_lastnotes_cnt)
-               return FALSE;
+               return false;
        float pitchshift = 0;
 
        if(instrument >= 0)
                if(pl.tuba_instrument != instrument)
-                       return FALSE;
+                       return false;
 
        // verify notes...
-       nolength = FALSE;
+       nolength = false;
        for(i = 0; i < n; ++i)
        {
                vector v = pl.(tuba_lastnotes[(pl.tuba_lastnotes_last - i + MAX_TUBANOTES) % MAX_TUBANOTES]);
                float ai = stof(argv(n - i - 1));
                float np = floor(ai);
                if(ai == np)
-                       nolength = TRUE;
+                       nolength = true;
                // n counts the last played notes BACKWARDS
                // _x is start
                // _y is end
@@ -87,7 +87,7 @@ float W_Tuba_HasPlayed(entity pl, string melody, float instrument, float ignorep
                else
                {
                        if(v.z + pitchshift != np)
-                               return FALSE;
+                               return false;
                }
        }
 
@@ -138,12 +138,12 @@ float W_Tuba_HasPlayed(entity pl, string melody, float instrument, float ignorep
                }
 
                if(mmin > mmax) // rhythm fail
-                       return FALSE;
+                       return false;
        }
 
        pl.tuba_lastnotes_cnt = 0;
 
-       return TRUE;
+       return true;
 }
 
 void W_Tuba_NoteOff(void)
@@ -256,7 +256,7 @@ float W_Tuba_NoteSendEntity(entity to, float sf)
 
        msg_entity = to;
        if(!sound_allowed(MSG_ONE, self.realowner))
-               return FALSE;
+               return false;
 
        WriteByte(MSG_ENTITY, ENT_CLIENT_TUBANOTE);
        WriteByte(MSG_ENTITY, sf);
@@ -275,7 +275,7 @@ float W_Tuba_NoteSendEntity(entity to, float sf)
                WriteCoord(MSG_ENTITY, self.origin.y);
                WriteCoord(MSG_ENTITY, self.origin.z);
        }
-       return TRUE;
+       return true;
 }
 
 void W_Tuba_NoteThink(void)
@@ -321,7 +321,7 @@ void W_Tuba_NoteOn(float hittype)
        vector o;
        float n;
 
-       W_SetupShot(self, FALSE, 2, "", 0, WEP_CVAR(tuba, damage));
+       W_SetupShot(self, false, 2, "", 0, WEP_CVAR(tuba, damage));
 
        n = W_Tuba_GetNote(self, hittype);
 
@@ -351,7 +351,7 @@ void W_Tuba_NoteOn(float hittype)
                self.tuba_note.think = W_Tuba_NoteThink;
                self.tuba_note.nextthink = time;
                self.tuba_note.spawnshieldtime = time;
-               Net_LinkEntity(self.tuba_note, FALSE, 0, W_Tuba_NoteSendEntity);
+               Net_LinkEntity(self.tuba_note, false, 0, W_Tuba_NoteSendEntity);
        }
 
        self.tuba_note.teleport_time = time + WEP_CVAR(tuba, refire) * 2 * W_WeaponRateFactor(); // so it can get prolonged safely
@@ -383,7 +383,7 @@ float W_Tuba(float req)
                                        self.BUTTON_ATCK2 = 1;
                        }
                        
-                       return TRUE;
+                       return true;
                }
                case WR_THINK:
                {
@@ -412,7 +412,7 @@ float W_Tuba(float req)
                                }
                        }
                        
-                       return TRUE;
+                       return true;
                }
                case WR_INIT:
                {
@@ -423,14 +423,14 @@ float W_Tuba(float req)
                        precache_model("models/weapons/h_akordeon.iqm");
                        precache_model("models/weapons/v_kleinbottle.md3");
                        precache_model("models/weapons/h_kleinbottle.iqm");
-                       TUBA_SETTINGS(WEP_SKIP_CVAR, WEP_SET_PROP)
-                       return TRUE;
+                       TUBA_SETTINGS(WEP_SKIP_CVAR, WEP_SET_PROP);
+                       return true;
                }
                case WR_SETUP:
                {
                        self.ammo_field = ammo_none;
                        self.tuba_instrument = 0;
-                       return TRUE;
+                       return true;
                }
                case WR_RELOAD:
                {
@@ -452,23 +452,23 @@ float W_Tuba(float req)
                                                self.weaponname = "tuba";
                                                break;
                                }
-                               W_SetupShot(self, FALSE, 0, "", 0, 0);
+                               W_SetupShot(self, false, 0, "", 0, 0);
                                pointparticles(particleeffectnum("teleport"), w_shotorg, '0 0 0', 1);
                                self.weaponentity.state = WS_INUSE;
                                weapon_thinkf(WFRAME_RELOAD, 0.5, w_ready);
                        }
                        
-                       return TRUE;
+                       return true;
                }
                case WR_CHECKAMMO1:
                case WR_CHECKAMMO2:
                {
-                       return TRUE; // tuba has infinite ammo
+                       return true; // tuba has infinite ammo
                }
                case WR_CONFIG:
                {
-                       TUBA_SETTINGS(WEP_CONFIG_WRITE_CVARS, WEP_CONFIG_WRITE_PROPS)
-                       return TRUE;
+                       TUBA_SETTINGS(WEP_CONFIG_WRITE_CVARS, WEP_CONFIG_WRITE_PROPS);
+                       return true;
                }
                case WR_SUICIDEMESSAGE:
                {
@@ -489,7 +489,7 @@ float W_Tuba(float req)
                                return WEAPON_TUBA_MURDER;
                }
        }
-       return FALSE;
+       return false;
 }
 #endif
 #ifdef CSQC
@@ -503,11 +503,11 @@ float W_Tuba(float req)
                case WR_ZOOMRETICLE:
                {
                        // no weapon specific image for this weapon
-                       return FALSE;
+                       return false;
                }
        }
 
-       return FALSE;
+       return false;
 }
 #endif
 #endif