void ItemRead(float _IsNew)
{
- float sf = ReadByte();
+ int sf = ReadByte();
if(sf & ISF_LOCATION)
{
- if(fexists(sprintf("%s%s.md3", _fn2, autocvr_cl_simpleitems_postfix)))
- self.mdl = strzone(sprintf("%s%s.md3", _fn2, autocvr_cl_simpleitems_postfix));
- else if(fexists(sprintf("%s%s.dpm", _fn2, autocvr_cl_simpleitems_postfix)))
- self.mdl = strzone(sprintf("%s%s.dpm", _fn2, autocvr_cl_simpleitems_postfix));
- else if(fexists(sprintf("%s%s.iqm", _fn2, autocvr_cl_simpleitems_postfix)))
- self.mdl = strzone(sprintf("%s%s.iqm", _fn2, autocvr_cl_simpleitems_postfix));
- else if(fexists(sprintf("%s%s.obj", _fn2, autocvr_cl_simpleitems_postfix)))
- self.mdl = strzone(sprintf("%s%s.obj", _fn2, autocvr_cl_simpleitems_postfix));
+ if(fexists(sprintf("%s%s.md3", _fn2, autocvar_cl_simpleitems_postfix)))
+ self.mdl = strzone(sprintf("%s%s.md3", _fn2, autocvar_cl_simpleitems_postfix));
+ else if(fexists(sprintf("%s%s.dpm", _fn2, autocvar_cl_simpleitems_postfix)))
+ self.mdl = strzone(sprintf("%s%s.dpm", _fn2, autocvar_cl_simpleitems_postfix));
+ else if(fexists(sprintf("%s%s.iqm", _fn2, autocvar_cl_simpleitems_postfix)))
+ self.mdl = strzone(sprintf("%s%s.iqm", _fn2, autocvar_cl_simpleitems_postfix));
+ else if(fexists(sprintf("%s%s.obj", _fn2, autocvar_cl_simpleitems_postfix)))
+ self.mdl = strzone(sprintf("%s%s.obj", _fn2, autocvar_cl_simpleitems_postfix));
else
{
self.draw = ItemDraw;
entity wi = get_weaponinfo(self.weapon);
if(wi)
{
- name = wi.model2;
+ name = wi.wpmodel;
rgb = '1 0 0';
}
}
pickedup = TRUE;
for(i = WEP_FIRST; i <= WEP_LAST; ++i)
if(it & WepSet_FromWeapon(i))
+ {
+ W_DropEvent(WR_PICKUP, player, i, item);
W_GiveWeapon(player, i);
+ }
}
}
{
pickedup = TRUE;
player.items |= it;
- sprint (player, strcat("You got the ^2", item.netname, "\n"));
+ Send_Notification(NOTIF_ONE, player, MSG_INFO, INFO_ITEM_WEAPON_GOT, item.netname);
}
if (item.strength_finished)
if (!IS_PLAYER(other))
return;
+ if (other.frozen)
+ return;
if (other.deadflag)
return;
if (self.solid != SOLID_TRIGGER)
else if(wi.items & IT_PLASMA)
need_plasma = TRUE;
else if(wi.items & IT_FUEL)
- need_cells = TRUE;
+ need_fuel = TRUE;
}
// TODO: figure out if the player even has the weapon this ammo is for?
else
{
error("invalid spawnflags");
-#ifdef GMQCC
- itemprefix = string_null;
- valueprefix = string_null;
-#endif
+ itemprefix = valueprefix = string_null;
}
self.netname = "";
void spawnfunc_item_jetpack(void)
{
- if(g_grappling_hook)
- return; // sorry, but these two can't coexist (same button); spawn fuel instead
if(!self.ammo_fuel)
self.ammo_fuel = g_pickup_fuel_jetpack;
if(start_items & IT_JETPACK)