return vtag;
}
-void vehicles_reset_colors(entity this)
+void vehicles_reset_colors(entity this, entity player)
{
int eff = 0, cmap;
const vector cmod = '0 0 0';
if(this.team && teamplay)
cmap = 1024 + (this.team - 1) * 17;
+ else if(player)
+ cmap = player.colormap;
else
cmap = 1024;
if(autocvar_g_nodepthtestplayers)
else
{
vehicles_setreturn(this);
- vehicles_reset_colors(this);
+ vehicles_reset_colors(this, actor);
}
}
}
vehic.vehicle_exit(vehic, eject);
vehicles_setreturn(vehic);
- vehicles_reset_colors(vehic);
+ vehicles_reset_colors(vehic, NULL);
vehic.owner = NULL;
CSQCMODEL_AUTOINIT(vehic);
veh.team = pl.team;
veh.flags -= FL_NOTARGET;
+ vehicles_reset_colors(veh, pl);
+
if (IS_REAL_CLIENT(pl))
{
Send_Notification(NOTIF_ONE, pl, MSG_CENTER, CENTER_VEHICLE_ENTER);
Vehicle info = Vehicles_from(this.vehicleid);
info.vr_spawn(info, this);
- vehicles_reset_colors(this);
+ vehicles_reset_colors(this, NULL);
CSQCMODEL_AUTOINIT(this);
}