RandomSelection_Init();
FOREACH(Weapons, it != WEP_Null && (!((it.spawnflags & WEP_FLAG_HIDDEN) || (it.spawnflags & WEP_FLAG_MUTATORBLOCKED)) || autocvar_g_nades_emerald_randomweapons_includespecial),
{
- if((it.spawnflags & WEP_FLAG_HIDDEN) && (it.spawnflags & WEP_FLAG_MUTATORBLOCKED))
+ if((it.spawnflags & WEP_FLAG_HIDDEN) && (it.spawnflags & WEP_FLAG_MUTATORBLOCKED)) // && (it.spawnflags & WEP_TYPE_OTHER))
continue;
float chancewep = 1;
if(it.spawnflags & WEP_FLAG_SPECIALATTACK) //LegendGuard fixes the strange part of the code
if(!autocvar_g_vehicles)
return;
- // looks like a bad practice
- time = 0.7;
-
e = spawnvehicle(
e,
- "random",
+ this.pokenade_type,
VEH_Null,
this.realowner,
this.realowner,
e = spawnturret(
e,
- "random", //this.tandemnade_type,
+ this.pokenade_type,
TUR_Null,
this.realowner,
this.realowner,
MSG_CENTER_NOTIF(VEHICLE_ENTER_GUNNER, N_ENABLE, 0, 0, "pass_key", CPID_VEHICLES, "0 0", _("^BGPress ^F2%s^BG to enter the vehicle gunner"), "")
MSG_CENTER_NOTIF(VEHICLE_ENTER_STEAL, N_ENABLE, 0, 0, "pass_key", CPID_VEHICLES, "0 0", _("^BGPress ^F2%s^BG to steal this vehicle"), "")
MSG_CENTER_NOTIF(VEHICLE_STEAL, N_ENABLE, 0, 0, "", CPID_VEHICLES_OTHER, "0 0", _("^F2The enemy is stealing one of your vehicles!\n^F4Stop them!"), "")
+ MSG_CENTER_NOTIF(VEHICLE_STEAL_OWNER, N_ENABLE, 1, 0, "s1", CPID_VEHICLES_OTHER, "4 0", _("^F2Intruder detected, %s vehicle is being stolen,\n disabling shields!"), "")
MSG_CENTER_NOTIF(VEHICLE_STEAL_SELF, N_ENABLE, 0, 0, "", CPID_VEHICLES_OTHER, "4 0", _("^F2Intruder detected, disabling shields!"), "")
MSG_CENTER_NOTIF(WEAPON_MINELAYER_LIMIT, N_ENABLE, 0, 1, "f1", CPID_Null, "0 0", _("^BGYou cannot place more than ^F2%s^BG mines at a time"), "")
turret_initialize(e, tur);
tmp_turcount++;
-
- //LOG_INFOF("^1tur.netname^3: %s", tur.netname);
+
+ // LOG_INFOF("^1tur.netname^3: %s", tur.netname);
if (optional)
e.tur_head.effects = (EF_DIMLIGHT | EF_FULLBRIGHT);
if(veh.owner)
return; // got here and didn't enter the gunner, return
+ if(!teamplay)
+ if(!veh.realowner)
+ if(veh.realowner != pl && autocvar_g_vehicles_steal)
+ {
+ Send_Notification(NOTIF_ONE, pl, MSG_CENTER, CENTER_VEHICLE_STEAL_OWNER, veh.realowner.netname);
+
+ veh.vehicle_shield = 0;
+ veh.old_vehicle_flags = veh.vehicle_flags; // make a backup just so we're not permanently crippling this vehicle
+ veh.vehicle_flags &= ~VHF_SHIELDREGEN;
+ }
+
if(teamplay)
if(veh.team)
if(DIFF_TEAM(pl, veh))
if(this.active == ACTIVE_NOT)
this.nextthink = 0; // wait until activated
- else if(autocvar_g_vehicles_delayspawn)
+ else if(autocvar_g_vehicles_delayspawn && !this.summoned)
this.nextthink = time + this.respawntime + (random() * autocvar_g_vehicles_delayspawn_jitter);
+ else if(this.summoned)
+ this.nextthink = time;
else
this.nextthink = time + game_starttime;
e.optional_setup = optional;
e.no_respawn_option = no_respwn;
- e.cannot_respawn = false;
+ e.summoned = true;
setorigin(e, orig);
bool allow_any = boolean(vehicle == "anyrandom");
}
e.realowner = spawnedby;
+ e.colormod = spawnedby.colormod;
+ e.colormap = spawnedby.colormap;
if(IS_PLAYER(spawnedby))
{
tmp_vehcount++;
+ // LOG_INFOF("^4veh.netname^3: %s", veh.netname);
+
return e;
}
.bool optional_setup;
.bool no_respawn_option;
.bool cannot_respawn;
+.bool summoned;
// vehicle functions
.void(int _spawnflag) vehicle_spawn; /// Vehicles custom fucntion to be efecuted when vehicle (re)spawns