nuclide/Source/server/flashlight.c
Marco Hladik 75bed53adc Client: We're now reading skyname and setting the skybox (with fallback) in CSQC. Much rejoice
Added item_suit and item_longjump... they do not do anything interesting yet.
Decals: Added glass break decals upon impact
Damage: Brush-entity radius damage should to work better now
Also seperated the weapons table from generic weapon entry functions. This should make maintaining mods easier
Fixed references from sv_clientslots to sv_playerslots. My brain gets confused between the Quake games at this point. I blame FTE
Fixed sprite animation cycle length check. It attempted to play one more frame than any sprite ever has. Needs more heavy testing?
2019-03-14 20:13:02 +01:00

23 lines
456 B
C

/***
*
* Copyright (c) 2016-2019 Marco 'eukara' Hladik. All rights reserved.
*
* See the file LICENSE attached with the sources for usage details.
*
****/
void Flashlight_Toggle(void)
{
if (cvar("sv_playerslots") != 1) {
if (cvar("mp_flashlight") != 1) {
return;
}
}
if (self.flags & FL_FLASHLIGHT) {
self.flags &= ~FL_FLASHLIGHT;
} else {
self.flags |= FL_FLASHLIGHT;
}
sound(self, CHAN_ITEM, "items/flashlight1.wav", 1, ATTN_IDLE);
}