]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/server/cl_client.qc
Reset vehicles when match is resetting, also make sure player exits vehicle when...
[xonotic/xonotic-data.pk3dir.git] / qcsrc / server / cl_client.qc
index 146209528db92a1b08f8079249c4df41c58b6c69..957742be5741efe62f4c3172ee036822e4527cf0 100644 (file)
@@ -462,6 +462,8 @@ void PutClientInServer(entity this)
        if (IS_OBSERVER(this)) {
                PutObserverInServer(this);
        } else if (IS_PLAYER(this)) {
+               if (this.vehicle) vehicles_exit(this.vehicle, VHEF_RELEASE);
+               
                PlayerState_attach(this);
                accuracy_resend(this);
 
@@ -2168,10 +2170,8 @@ void PlayerPreThink (entity this)
                        {
                                if(!it.team || SAME_TEAM(this, it))
                                        Send_Notification(NOTIF_ONE, this, MSG_CENTER, CENTER_VEHICLE_ENTER);
-                       }
-                       else if(autocvar_g_vehicles_steal)
-                       {
-                               Send_Notification(NOTIF_ONE, this, MSG_CENTER, CENTER_VEHICLE_ENTER_STEAL);
+                               else if(autocvar_g_vehicles_steal)
+                                       Send_Notification(NOTIF_ONE, this, MSG_CENTER, CENTER_VEHICLE_ENTER_STEAL);
                        }
                });