SERVER: Allow custom model paths for item_radio

This commit is contained in:
cypress 2024-06-09 17:20:01 -07:00
parent 8810ab5636
commit 1665792e45

View file

@ -94,7 +94,10 @@ void() radio_hit =
void() item_radio =
{
precache_model ("models/props/radio.mdl");
if (!self.model)
self.model = "models/props/radio.mdl";
precache_model (self.model);
precache_sound ("sounds/misc/radio.wav");
// Backwards compatibility
@ -107,7 +110,7 @@ void() item_radio =
self.movetype = MOVETYPE_NONE; // so it doesn't get pushed by anything
self.solid=SOLID_BBOX;
self.classname = "item_radio";
setmodel (self, "models/props/radio.mdl");
setmodel (self, self.model);
setsize (self, '-8 -8 -4', '8 8 4');
self.takedamage = DAMAGE_YES;