self.vehicle_ammo2 = spectatee.vehicle_ammo2;
self.vehicle_reload1 = spectatee.vehicle_reload1;
self.vehicle_reload2 = spectatee.vehicle_reload2;
+
+ msg_entity = self;
+ WriteByte (MSG_ONE, SVC_SETVIEWPORT);
+ WriteEntity(MSG_ONE, spectatee);
+ //self.tur_head = spectatee.vehicle.vehicle_viewport;
}
}
self.enemy = other;
if(self.enemy.classname == "player") {
- msg_entity = self;
- WriteByte(MSG_ONE, SVC_SETVIEW);
- WriteEntity(MSG_ONE, self.enemy);
if(self.enemy.vehicle)
{
+ msg_entity = self;
+ WriteByte(MSG_ONE, SVC_SETVIEWPORT);
+ WriteEntity(MSG_ONE, self.enemy);
//stuffcmd(self, "set viewsize $tmpviewsize \n");
self.movetype = MOVETYPE_NONE;
accuracy_resend(self);
}
else
{
+ msg_entity = self;
+ WriteByte(MSG_ONE, SVC_SETVIEW);
+ WriteEntity(MSG_ONE, self.enemy);
//stuffcmd(self, "set viewsize $tmpviewsize \n");
self.movetype = MOVETYPE_NONE;
accuracy_resend(self);
dprint(sprintf("%f %.6f\n", time, race_GetFractionalLapCount(self)));
*/
- if(self.vehicle)
- vehicles_updateplayer();
-
CSQCMODEL_AUTOUPDATE();
}
self.flags -= FL_NOTARGET;
msg_entity = other;
+ WriteByte (MSG_ONE, SVC_SETVIEWPORT);
+ WriteEntity(MSG_ONE, self.vehicle_viewport);
WriteByte (MSG_ONE, SVC_SETVIEWANGLES);
if(self.tur_head)
self.vehicle_spawn = self.vehicle_exit;
self.AuxiliaryXhair = self.AuxiliaryXhair;
}
-
-void vehicles_updateplayer()
-{
- setorigin(self, gettaginfo(self.vehicle.vehicle_viewport, 0));
-}
.void() vehicle_spawn;
void vehicles_exit(float eject);
-void vehicles_updateplayer(void);
var .void(float exit_flags) vehicle_exit;
float VHEF_NORMAL = 0; /// User pressed exit key
float VHEF_EJECT = 1; /// User pressed exit key 3 times fast (not implemented) or vehile is dying