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
else
{
if(v.z + pitchshift != np)
- return FALSE;
+ return false;
}
}
}
if(mmin > mmax) // rhythm fail
- return FALSE;
+ return false;
}
pl.tuba_lastnotes_cnt = 0;
- return TRUE;
+ return true;
}
void W_Tuba_NoteOff(void)
msg_entity = to;
if(!sound_allowed(MSG_ONE, self.realowner))
- return FALSE;
+ return false;
WriteByte(MSG_ENTITY, ENT_CLIENT_TUBANOTE);
WriteByte(MSG_ENTITY, sf);
WriteCoord(MSG_ENTITY, self.origin.y);
WriteCoord(MSG_ENTITY, self.origin.z);
}
- return TRUE;
+ return true;
}
void W_Tuba_NoteThink(void)
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);
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
self.BUTTON_ATCK2 = 1;
}
- return TRUE;
+ return true;
}
case WR_THINK:
{
}
}
- return TRUE;
+ return true;
}
case WR_INIT:
{
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:
{
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:
{
return WEAPON_TUBA_MURDER;
}
}
- return FALSE;
+ return false;
}
#endif
#ifdef CSQC
case WR_ZOOMRETICLE:
{
// no weapon specific image for this weapon
- return FALSE;
+ return false;
}
}
- return FALSE;
+ return false;
}
#endif
#endif