CSQCModel_Effects_Apply(e);
}
{
- static string name_last;
string name = wep.mdl;
- if(wep == WEP_TUBA)
- {
- name = (this.tuba_instrument == 0) ? "tuba" :
- (this.tuba_instrument == 1) ? "akordeon" :
- "kleinbottle";
- }
+ string newname = wep.wr_viewmodel(wep, this);
+ if(newname)
+ name = newname;
- bool swap = name != name_last;
+ bool swap = name != this.name_last;
// if (swap)
{
- name_last = name;
+ this.name_last = name;
CL_WeaponEntity_SetModel(this, name, swap);
this.viewmodel_origin = this.origin;
this.viewmodel_angles = this.angles;
// no weapon specific image for this weapon
return false;
}
+ /** (CLIENT) weapon specific view model */
+ METHOD(Weapon, wr_viewmodel, string(Weapon this, entity wep)) { return string_null; }
/** (CLIENT) weapon specific glow */
- METHOD(Weapon, wr_glow, vector(Weapon this, entity actor)) { return '0 0 0'; }
+ METHOD(Weapon, wr_glow, vector(Weapon this, entity actor, entity wepent)) { return '0 0 0'; }
/** (SERVER) the weapon is dropped */
- METHOD(Weapon, wr_drop, void(Weapon this, entity actor)) {}
+ METHOD(Weapon, wr_drop, void(Weapon this, entity actor, .entity weaponentity)) {}
/** (SERVER) a weapon is picked up */
- METHOD(Weapon, wr_pickup, void(Weapon this, entity actor)) {}
+ METHOD(Weapon, wr_pickup, void(Weapon this, entity actor, .entity weaponentity)) {}
/** (SERVER) update cvar based properties */
METHOD(Weapon, wr_update, void(Weapon this)) {}
METHOD(Weapon, display, void(entity this, void(string name, string icon) returns)) {