set g_balance_hagar_reload_time 2
// }}}
// {{{ rocketlauncher
-set g_balance_rocketlauncher_damage 80
-set g_balance_rocketlauncher_edgedamage 40
+set g_balance_rocketlauncher_damage 70
+set g_balance_rocketlauncher_edgedamage 35
set g_balance_rocketlauncher_force 450
set g_balance_rocketlauncher_radius 110
set g_balance_rocketlauncher_speed 1300
set g_balance_rocketlauncher_speedaccel 1300
set g_balance_rocketlauncher_speedstart 1000
set g_balance_rocketlauncher_lifetime 10
-set g_balance_rocketlauncher_refire 1.1
+set g_balance_rocketlauncher_refire 1.2
set g_balance_rocketlauncher_animtime 0.4
set g_balance_rocketlauncher_ammo 4
set g_balance_rocketlauncher_health 30 // 30 // 5 hitpoints above maximum laser value -- this way lasers can't blow it up, but grenadelauncher still can most the time.
set g_balance_rocketlauncher_damageforcescale 1 // low damage force scale so that it can still be affected by other hits, but not so much that it does a 90 degree turn
set g_balance_rocketlauncher_detonatedelay 0.02 // positive: timer till detonation is allowed, negative: "security device" that prevents ANY remote detonation if it could hurt its owner, zero: detonatable at any time
-set g_balance_rocketlauncher_guiderate 90 // max degrees per second
+set g_balance_rocketlauncher_guiderate 70 // max degrees per second
set g_balance_rocketlauncher_guideratedelay 0.01 // immediate
set g_balance_rocketlauncher_guidegoal 512 // goal distance for (non-laser) guiding (higher = less control, lower = erratic)
set g_balance_rocketlauncher_guidedelay 0.2 // delay before guiding kicks in
set g_balance_rocketlauncher_remote_edgedamage 35
set g_balance_rocketlauncher_remote_radius 110
set g_balance_rocketlauncher_remote_force 400
-set g_balance_rocketlauncher_switchdelay_drop 0.2
+set g_balance_rocketlauncher_switchdelay_drop 0.3
set g_balance_rocketlauncher_switchdelay_raise 0.2
set g_balance_rocketlauncher_reload_ammo 0 //default: 25
set g_balance_rocketlauncher_reload_time 2
set g_balance_hagar_reload_time 2
// }}}
// {{{ rocketlauncher
-set g_balance_rocketlauncher_damage 80
-set g_balance_rocketlauncher_edgedamage 40
+set g_balance_rocketlauncher_damage 70
+set g_balance_rocketlauncher_edgedamage 35
set g_balance_rocketlauncher_force 450
set g_balance_rocketlauncher_radius 110
set g_balance_rocketlauncher_speed 1300
set g_balance_rocketlauncher_speedaccel 1300
set g_balance_rocketlauncher_speedstart 1000
set g_balance_rocketlauncher_lifetime 10
-set g_balance_rocketlauncher_refire 1.1
+set g_balance_rocketlauncher_refire 1.2
set g_balance_rocketlauncher_animtime 0.4
set g_balance_rocketlauncher_ammo 4
set g_balance_rocketlauncher_health 30 // 30 // 5 hitpoints above maximum laser value -- this way lasers can't blow it up, but grenadelauncher still can most the time.
set g_balance_rocketlauncher_damageforcescale 1 // low damage force scale so that it can still be affected by other hits, but not so much that it does a 90 degree turn
set g_balance_rocketlauncher_detonatedelay 0.02 // positive: timer till detonation is allowed, negative: "security device" that prevents ANY remote detonation if it could hurt its owner, zero: detonatable at any time
-set g_balance_rocketlauncher_guiderate 90 // max degrees per second
+set g_balance_rocketlauncher_guiderate 70 // max degrees per second
set g_balance_rocketlauncher_guideratedelay 0.01 // immediate
set g_balance_rocketlauncher_guidegoal 512 // goal distance for (non-laser) guiding (higher = less control, lower = erratic)
set g_balance_rocketlauncher_guidedelay 0.2 // delay before guiding kicks in
set g_balance_rocketlauncher_remote_edgedamage 35
set g_balance_rocketlauncher_remote_radius 110
set g_balance_rocketlauncher_remote_force 400
-set g_balance_rocketlauncher_switchdelay_drop 0.2
+set g_balance_rocketlauncher_switchdelay_drop 0.3
set g_balance_rocketlauncher_switchdelay_raise 0.2
set g_balance_rocketlauncher_reload_ammo 0 //default: 25
set g_balance_rocketlauncher_reload_time 2
set _menu_vid_height "$vid_height"
set _menu_vid_pixelheight "$vid_pixelheight"
seta menu_vid_scale 0
+seta menu_vid_allowdualscreenresolution 0
// 2D resolution 800x600
vid_conwidth 800
vid_conheight 600
set g_playerclip_collisions 1 "0 = disable collision testing against playerclips, might be useful on some defrag maps"
set g_botclip_collisions 1 "0 = disable collision testing against botclips, might be useful on some defrag maps"
-set welcome_message_time 8
-
set g_grappling_hook 0 "let players spawn with the grappling hook which allows them to pull themselves up"
set g_spawn_alloweffects 1 "allow clients to enable spawn point and event effects such as particles and sounds, see cl_spawn_ cvars for more info"
if(autocvar_hud_panel_healtharmor == 2) // combined health and armor display
{
vector v;
- v = healtharmor_maxdamage(health, armor, armorblockpercent);
+ v = healtharmor_maxdamage(health, armor, armorblockpercent, DEATH_WEAPON);
float x;
x = floor(v_x + 1);
{
MapInfo_Map_flags |= MAPINFO_FLAG_FRUSTRATING;
}
+ else if(t == "noautomaplist")
+ {
+ MapInfo_Map_flags |= MAPINFO_FLAG_NOAUTOMAPLIST;
+ }
else if(t == "type")
{
t = car(s); s = cdr(s);
const float MAPINFO_FLAG_HIDDEN = 1; // not in lsmaps/menu/vcall/etc., can just be changed to manually
const float MAPINFO_FLAG_FORBIDDEN = 2; // don't even allow the map by a cvar setting that allows hidden maps
const float MAPINFO_FLAG_FRUSTRATING = 4; // this map is near impossible to play, enable at your own risk
+const float MAPINFO_FLAG_NOAUTOMAPLIST = 8; // do not include when automatically building maplist (counts as hidden for maplist building purposes)
float MapInfo_count;
}
}
-vector healtharmor_maxdamage(float h, float a, float armorblock)
+#ifndef MENUQC
+vector healtharmor_maxdamage(float h, float a, float armorblock, float deathtype)
{
// NOTE: we'll always choose the SMALLER value...
float healthdamage, armordamage, armorideal;
+ if (deathtype == DEATH_DROWN) // Why should armor help here...
+ armorblock = 0;
vector v;
healthdamage = (h - 1) / (1 - armorblock); // damage we can take if we could use more health
armordamage = a + (h - 1); // damage we can take if we could use more armor
return v;
}
-vector healtharmor_applydamage(float a, float armorblock, float damage)
+vector healtharmor_applydamage(float a, float armorblock, float deathtype, float damage)
{
vector v;
+ if (deathtype == DEATH_DROWN) // Why should armor help here...
+ armorblock = 0;
v_y = bound(0, damage * armorblock, a); // save
v_x = bound(0, damage - v_y, damage); // take
v_z = 0;
return v;
}
+#endif
string getcurrentmod()
{
void RandomSelection_Init();
void RandomSelection_Add(entity e, float f, string s, float weight, float priority);
-vector healtharmor_maxdamage(float h, float a, float armorblock); // returns vector: maxdamage, armorideal, 1 if fully armored
-vector healtharmor_applydamage(float a, float armorblock, float damage); // returns vector: take, save, 0
+#ifndef MENUQC
+vector healtharmor_maxdamage(float h, float a, float armorblock, float deathtype); // returns vector: maxdamage, armorideal, 1 if fully armored
+vector healtharmor_applydamage(float a, float armorblock, float deathtype, float damage); // returns vector: take, save, 0
+#endif
string getcurrentmod();
ATTRIB(Dialog, zoomedOutTitleBarPosition, float, 0)
ATTRIB(Dialog, zoomedOutTitleBar, float, 0)
+ ATTRIB(Dialog, requiresConnection, float, 0) // set to TRUE if the dialog requires a connection to be opened
+
ATTRIB(Dialog, backgroundImage, string, string_null)
ATTRIB(Dialog, borderLines, float, 1)
ATTRIB(Dialog, closeButtonImage, string, string_null)
for(e = NULL; (e = find(e, name, itemname)); )
if(e.classname != "vtbl")
break;
- if(e)
+
+ if((e) && (!e.requiresConnection || (gamestatus & (GAME_ISSERVER | GAME_CONNECTED))))
{
m_hide();
m_activate_window(e);
ATTRIB(XonoticHUDAmmoDialog, rows, float, 15)
ATTRIB(XonoticHUDAmmoDialog, columns, float, 4)
ATTRIB(XonoticHUDAmmoDialog, name, string, "HUDammo")
+ ATTRIB(XonoticHUDAmmoDialog, requiresConnection, float, TRUE)
ENDCLASS(XonoticHUDAmmoDialog)
#endif
ATTRIB(XonoticHUDCenterprintDialog, rows, float, 15)
ATTRIB(XonoticHUDCenterprintDialog, columns, float, 4)
ATTRIB(XonoticHUDCenterprintDialog, name, string, "HUDcenterprint")
+ ATTRIB(XonoticHUDCenterprintDialog, requiresConnection, float, TRUE)
ENDCLASS(XonoticHUDCenterprintDialog)
#endif
ATTRIB(XonoticHUDChatDialog, rows, float, 15)
ATTRIB(XonoticHUDChatDialog, columns, float, 4)
ATTRIB(XonoticHUDChatDialog, name, string, "HUDchat")
+ ATTRIB(XonoticHUDChatDialog, requiresConnection, float, TRUE)
ENDCLASS(XonoticHUDChatDialog)
#endif
ATTRIB(XonoticHUDEngineInfoDialog, rows, float, 15)
ATTRIB(XonoticHUDEngineInfoDialog, columns, float, 4)
ATTRIB(XonoticHUDEngineInfoDialog, name, string, "HUDengineinfo")
+ ATTRIB(XonoticHUDEngineInfoDialog, requiresConnection, float, TRUE)
ENDCLASS(XonoticHUDEngineInfoDialog)
#endif
ATTRIB(XonoticHUDHealthArmorDialog, rows, float, 15)
ATTRIB(XonoticHUDHealthArmorDialog, columns, float, 4)
ATTRIB(XonoticHUDHealthArmorDialog, name, string, "HUDhealtharmor")
+ ATTRIB(XonoticHUDHealthArmorDialog, requiresConnection, float, TRUE)
ENDCLASS(XonoticHUDHealthArmorDialog)
#endif
ATTRIB(XonoticHUDInfoMessagesDialog, rows, float, 15)
ATTRIB(XonoticHUDInfoMessagesDialog, columns, float, 4)
ATTRIB(XonoticHUDInfoMessagesDialog, name, string, "HUDinfomessages")
+ ATTRIB(XonoticHUDInfoMessagesDialog, requiresConnection, float, TRUE)
ENDCLASS(XonoticHUDInfoMessagesDialog)
#endif
ATTRIB(XonoticHUDModIconsDialog, rows, float, 15)
ATTRIB(XonoticHUDModIconsDialog, columns, float, 4)
ATTRIB(XonoticHUDModIconsDialog, name, string, "HUDmodicons")
+ ATTRIB(XonoticHUDModIconsDialog, requiresConnection, float, TRUE)
ENDCLASS(XonoticHUDModIconsDialog)
#endif
ATTRIB(XonoticHUDNotificationDialog, rows, float, 15)
ATTRIB(XonoticHUDNotificationDialog, columns, float, 4)
ATTRIB(XonoticHUDNotificationDialog, name, string, "HUDnotify")
+ ATTRIB(XonoticHUDNotificationDialog, requiresConnection, float, TRUE)
ENDCLASS(XonoticHUDNotificationDialog)
#endif
ATTRIB(XonoticHUDPhysicsDialog, columns, float, 4)
ATTRIB(XonoticHUDPhysicsDialog, name, string, "HUDphysics")
ATTRIB(XonoticHUDPhysicsDialog, sliderTopspeedTime, entity, NULL)
+ ATTRIB(XonoticHUDPhysicsDialog, requiresConnection, float, TRUE)
ENDCLASS(XonoticHUDPhysicsDialog)
#endif
ATTRIB(XonoticHUDPowerupsDialog, rows, float, 15)
ATTRIB(XonoticHUDPowerupsDialog, columns, float, 4)
ATTRIB(XonoticHUDPowerupsDialog, name, string, "HUDpowerups")
+ ATTRIB(XonoticHUDPowerupsDialog, requiresConnection, float, TRUE)
ENDCLASS(XonoticHUDPowerupsDialog)
#endif
ATTRIB(XonoticHUDPressedKeysDialog, rows, float, 15)
ATTRIB(XonoticHUDPressedKeysDialog, columns, float, 4)
ATTRIB(XonoticHUDPressedKeysDialog, name, string, "HUDpressedkeys")
+ ATTRIB(XonoticHUDPressedKeysDialog, requiresConnection, float, TRUE)
ENDCLASS(XonoticHUDPressedKeysDialog)
#endif
ATTRIB(XonoticHUDRaceTimerDialog, rows, float, 15)
ATTRIB(XonoticHUDRaceTimerDialog, columns, float, 4)
ATTRIB(XonoticHUDRaceTimerDialog, name, string, "HUDracetimer")
+ ATTRIB(XonoticHUDRaceTimerDialog, requiresConnection, float, TRUE)
ENDCLASS(XonoticHUDRaceTimerDialog)
#endif
ATTRIB(XonoticHUDRadarDialog, rows, float, 15)
ATTRIB(XonoticHUDRadarDialog, columns, float, 4)
ATTRIB(XonoticHUDRadarDialog, name, string, "HUDradar")
+ ATTRIB(XonoticHUDRadarDialog, requiresConnection, float, TRUE)
ENDCLASS(XonoticHUDRadarDialog)
#endif
ATTRIB(XonoticHUDScoreDialog, rows, float, 15)
ATTRIB(XonoticHUDScoreDialog, columns, float, 4)
ATTRIB(XonoticHUDScoreDialog, name, string, "HUDscore")
+ ATTRIB(XonoticHUDScoreDialog, requiresConnection, float, TRUE)
ENDCLASS(XonoticHUDScoreDialog)
#endif
ATTRIB(XonoticHUDTimerDialog, rows, float, 15)
ATTRIB(XonoticHUDTimerDialog, columns, float, 4)
ATTRIB(XonoticHUDTimerDialog, name, string, "HUDtimer")
+ ATTRIB(XonoticHUDTimerDialog, requiresConnection, float, TRUE)
ENDCLASS(XonoticHUDTimerDialog)
#endif
ATTRIB(XonoticHUDVoteDialog, rows, float, 15)
ATTRIB(XonoticHUDVoteDialog, columns, float, 4)
ATTRIB(XonoticHUDVoteDialog, name, string, "HUDvote")
+ ATTRIB(XonoticHUDVoteDialog, requiresConnection, float, TRUE)
ENDCLASS(XonoticHUDVoteDialog)
#endif
ATTRIB(XonoticHUDWeaponsDialog, rows, float, 18)
ATTRIB(XonoticHUDWeaponsDialog, columns, float, 4)
ATTRIB(XonoticHUDWeaponsDialog, name, string, "HUDweapons")
+ ATTRIB(XonoticHUDWeaponsDialog, requiresConnection, float, TRUE)
ENDCLASS(XonoticHUDWeaponsDialog)
#endif
ATTRIB(XonoticHUDExitDialog, rows, float, 18)
ATTRIB(XonoticHUDExitDialog, columns, float, 4)
ATTRIB(XonoticHUDExitDialog, name, string, "HUDExit")
+ ATTRIB(XonoticHUDExitDialog, requiresConnection, float, TRUE)
ENDCLASS(XonoticHUDExitDialog)
#endif
s = strcat(s, ", ", WeaponArenaString());
if(cvar("g_start_weapon_laser") == 0)
s = strcat(s, ", ", _("No start weapons"));
- if(cvar("sv_gravity") < 800)
+ if(cvar("sv_gravity") < stof(cvar_defstring("sv_gravity")))
s = strcat(s, ", ", _("Low gravity"));
if(cvar("g_cloaked"))
s = strcat(s, ", ", _("Cloaked"));
ATTRIB(XonoticSandboxToolsDialog, rows, float, 16)
ATTRIB(XonoticSandboxToolsDialog, columns, float, 4)
ATTRIB(XonoticSandboxToolsDialog, name, string, "SandboxTools")
+ ATTRIB(XonoticSandboxToolsDialog, requiresConnection, float, TRUE)
ENDCLASS(XonoticSandboxToolsDialog)
#endif
ATTRIB(XonoticTeamSelectDialog, team2, entity, NULL)
ATTRIB(XonoticTeamSelectDialog, team3, entity, NULL)
ATTRIB(XonoticTeamSelectDialog, team4, entity, NULL)
+ ATTRIB(XonoticTeamSelectDialog, requiresConnection, float, TRUE)
ENDCLASS(XonoticTeamSelectDialog)
#endif
me.addValue(me, strzone(sprintf(_("%dx%d"), w, h)), strzone(strcat(ftos(w), " ", ftos(h), " ", ftos(pixelheight))));
// FIXME (in case you ever want to dynamically instantiate this): THIS IS NEVER FREED
}
+float autocvar_menu_vid_allowdualscreenresolution;
void XonoticResolutionSlider_configureXonoticResolutionSlider(entity me)
{
float i;
if(r_x < 640 || r_y < 480)
continue;
if(r_x > 2 * r_y) // likely dualscreen resolution, skip this one
- continue;
+ if(autocvar_menu_vid_allowdualscreenresolution <= 0)
+ continue;
+
me.addResolution(me, r_x, r_y, r_z);
}
float autocvar_timelimit_suddendeath;
#define autocvar_utf8_enable cvar("utf8_enable")
float autocvar_waypoint_benchmark;
-float autocvar_welcome_message_time;
float autocvar_sv_gameplayfix_gravityunaffectedbyticrate;
float autocvar_g_trueaim_minrange;
float autocvar_g_debug_defaultsounds;
n = tokenize_console(defaultmodel);
if(n > 0)
+ {
defaultmodel = argv(floor(n * self.model_randomizer));
+ // However, do NOT randomize if the player-selected model is in the list.
+ for (i = 0; i < n; ++i)
+ if ((argv(i) == self.playermodel && defaultskin == stof(self.playerskin)) || argv(i) == strcat(self.playermodel, ":", self.playerskin))
+ defaultmodel = argv(i);
+ }
i = strstrofs(defaultmodel, ":", 0);
if(i >= 0)
{
if(self.BUTTON_INFO) // BUTTON_INFO hides initial MOTD
self.motd_actived_time = -2; // wait until BUTTON_INFO gets released
- else if(self.motd_actived_time == -2 || IS_PLAYER(self) || time - self.jointime > autocvar_welcome_message_time)
+ else if(self.motd_actived_time == -2 || IS_PLAYER(self))
{
// instanctly hide MOTD
self.motd_actived_time = 0;
//pointparticles(particleeffectnum("machinegun_impact"), self.origin + self.view_ofs + '0 0 7', '0 0 0', 1);
if(self.waypointsprite_attachedforcarrier)
- WaypointSprite_UpdateHealth(self.waypointsprite_attachedforcarrier, '1 0 0' * healtharmor_maxdamage(self.health, self.armorvalue, autocvar_g_balance_armor_blockpercent));
+ WaypointSprite_UpdateHealth(self.waypointsprite_attachedforcarrier, '1 0 0' * healtharmor_maxdamage(self.health, self.armorvalue, autocvar_g_balance_armor_blockpercent, DEATH_WEAPON));
playerdemo_write();
// damage resistance (ignore most of the damage from a bullet or similar)
damage = max(damage - 5, 1);
- v = healtharmor_applydamage(self.armorvalue, autocvar_g_balance_armor_blockpercent, damage);
+ v = healtharmor_applydamage(self.armorvalue, autocvar_g_balance_armor_blockpercent, deathtype, damage);
take = v_x;
save = v_y;
Violence_GibSplash_At(hitloc, force, 2, bound(0, damage, 200) / 16, self, attacker);
- v = healtharmor_applydamage(self.armorvalue, autocvar_g_balance_armor_blockpercent, damage);
+ v = healtharmor_applydamage(self.armorvalue, autocvar_g_balance_armor_blockpercent, deathtype, damage);
take = v_x;
save = v_y;
e.csqcprojectile_type = type;
}
+// FIXME HACK
+float ItemSend(entity to, float sf);
+void ItemUpdate(entity item);
+// END HACK
void UpdateCSQCProjectile(entity e)
{
if(e.SendEntity == CSQCProjectile_SendEntity)
// send new origin data
e.SendFlags |= 0x01;
}
+// FIXME HACK
+ else if(e.SendEntity == ItemSend)
+ {
+ ItemUpdate(e);
+ }
+// END HACK
}
void UpdateCSQCProjectileAfterTeleport(entity e)
if(deathtype == DEATH_KILL || deathtype == DEATH_TEAMCHANGE || deathtype == DEATH_AUTOTEAMCHANGE)
{
+ // exit the vehicle before killing (fixes a crash)
+ if(IS_PLAYER(targ) && targ.vehicle)
+ vehicles_exit(VHEF_RELESE);
+
// These are ALWAYS lethal
// No damage modification here
// Instead, prepare the victim for his death...
if(autocvar_g_mirrordamage_virtual)
{
- vector v = healtharmor_applydamage(attacker.armorvalue, autocvar_g_balance_armor_blockpercent, mirrordamage);
+ vector v = healtharmor_applydamage(attacker.armorvalue, autocvar_g_balance_armor_blockpercent, deathtype, mirrordamage);
attacker.dmg_take += v_x;
attacker.dmg_save += v_y;
attacker.dmg_inflictor = inflictor;
if(autocvar_g_friendlyfire_virtual)
{
- vector v = healtharmor_applydamage(targ.armorvalue, autocvar_g_balance_armor_blockpercent, damage);
+ vector v = healtharmor_applydamage(targ.armorvalue, autocvar_g_balance_armor_blockpercent, deathtype, damage);
targ.dmg_take += v_x;
targ.dmg_save += v_y;
targ.dmg_inflictor = inflictor;
BADCVAR("sv_fraginfo");
BADCVAR("sv_timeout");
BADPREFIX("sv_timeout_");
- BADCVAR("welcome_message_time");
BADPREFIX("crypto_");
BADPREFIX("g_chat_");
BADPREFIX("g_ctf_captimerecord_");
{
float pass, i;
+ dprint("Trying MaplistMethod_Iterate\n");
+
for(pass = 1; pass <= 2; ++pass)
{
for(i = 1; i < Map_Count; ++i)
float() MaplistMethod_Repeat = // fallback method
{
+ dprint("Trying MaplistMethod_Repeat\n");
+
if(Map_Check(Map_Current, 2))
return Map_Current;
return -2;
{
float i, imax;
+ dprint("Trying MaplistMethod_Random\n");
+
imax = 42;
for(i = 0; i <= imax; ++i)
{
float i, j, imax, insertpos;
+ dprint("Trying MaplistMethod_Shuffle\n");
+
imax = 42;
for(i = 0; i <= imax; ++i)
void Maplist_Init()
{
Map_Count = tokenizebyseparator(autocvar_g_maplist, " ");
- if(Map_Count == 0)
+ float i;
+ for (i = 0; i < Map_Count; ++i)
+ if (Map_Check(i, 2))
+ break;
+ if (i == Map_Count)
{
- bprint( "Maplist is empty! Resetting it to default map list.\n" );
- cvar_set("g_maplist", MapInfo_ListAllAllowedMaps(MapInfo_RequiredFlags(), MapInfo_ForbiddenFlags()));
+ bprint( "Maplist contains no usable maps! Resetting it to default map list.\n" );
+ cvar_set("g_maplist", MapInfo_ListAllAllowedMaps(MapInfo_RequiredFlags(), MapInfo_ForbiddenFlags() | MAPINFO_FLAG_NOAUTOMAPLIST));
if(autocvar_g_maplist_shuffle)
ShuffleMaplist();
localcmd("\nmenu_cmd sync\n");
return;
alreadychangedlevel = TRUE;
- {
- string nextMap;
- float allowReset;
+ string nextMap;
- for(allowReset = 1; allowReset >= 0; --allowReset)
- {
- nextMap = GetNextMap();
- if(nextMap != "")
- break;
-
- if(allowReset)
- {
- bprint( "Maplist contains no single playable map! Resetting it to default map list.\n" );
- cvar_set("g_maplist", MapInfo_ListAllAllowedMaps(MapInfo_RequiredFlags(), MapInfo_ForbiddenFlags()));
- if(autocvar_g_maplist_shuffle)
- ShuffleMaplist();
- localcmd("\nmenu_cmd sync\n");
- }
- else
- {
- error("Everything is broken - not even the default map list works. Please report this to the developers.");
- }
- }
- Map_Goto(reinit);
- }
+ nextMap = GetNextMap();
+ if(nextMap == "")
+ error("Everything is broken - cannot find a next map. Please report this to the developers.");
}
void ctf_FlagcarrierWaypoints(entity player)
{
WaypointSprite_Spawn("flagcarrier", 0, 0, player, FLAG_WAYPOINT_OFFSET, world, player.team, player, wps_flagcarrier, TRUE, RADARICON_FLAG, WPCOLOR_FLAGCARRIER(player.team));
- WaypointSprite_UpdateMaxHealth(player.wps_flagcarrier, '1 0 0' * healtharmor_maxdamage(start_health, start_armorvalue, autocvar_g_balance_armor_blockpercent) * 2);
- WaypointSprite_UpdateHealth(player.wps_flagcarrier, '1 0 0' * healtharmor_maxdamage(player.health, player.armorvalue, autocvar_g_balance_armor_blockpercent));
+ WaypointSprite_UpdateMaxHealth(player.wps_flagcarrier, '1 0 0' * healtharmor_maxdamage(start_health, start_armorvalue, autocvar_g_balance_armor_blockpercent, DEATH_WEAPON) * 2);
+ WaypointSprite_UpdateHealth(player.wps_flagcarrier, '1 0 0' * healtharmor_maxdamage(player.health, player.armorvalue, autocvar_g_balance_armor_blockpercent, DEATH_WEAPON));
WaypointSprite_UpdateTeamRadar(player.wps_flagcarrier, RADARICON_FLAGCARRIER, WPCOLOR_FLAGCARRIER(player.team));
}
// update the health of the flag carrier waypointsprite
if(self.wps_flagcarrier)
- WaypointSprite_UpdateHealth(self.wps_flagcarrier, '1 0 0' * healtharmor_maxdamage(self.health, self.armorvalue, autocvar_g_balance_armor_blockpercent));
+ WaypointSprite_UpdateHealth(self.wps_flagcarrier, '1 0 0' * healtharmor_maxdamage(self.health, self.armorvalue, autocvar_g_balance_armor_blockpercent, DEATH_WEAPON));
return FALSE;
}
}
else if(frag_target.flagcarried && (frag_target.deadflag == DEAD_NO) && CTF_DIFFTEAM(frag_target, frag_attacker)) // if the target is a flagcarrier
{
- if(autocvar_g_ctf_flagcarrier_auto_helpme_damage > ('1 0 0' * healtharmor_maxdamage(frag_target.health, frag_target.armorvalue, autocvar_g_balance_armor_blockpercent)))
+ if(autocvar_g_ctf_flagcarrier_auto_helpme_damage > ('1 0 0' * healtharmor_maxdamage(frag_target.health, frag_target.armorvalue, autocvar_g_balance_armor_blockpercent, DEATH_WEAPON)))
if(time > frag_target.wps_helpme_time + autocvar_g_ctf_flagcarrier_auto_helpme_time)
{
frag_target.wps_helpme_time = time;
return TRUE;
}
+void ItemUpdate(entity item)
+{
+ item.SendFlags |= ISF_LOCATION;
+}
float have_pickup_item(void)
{
e = WaypointSprite_Spawn(spr, 0, 0, carrier, '0 0 64', world, carrier.team, carrier, waypointsprite_attachedforcarrier, FALSE, icon, rgb);
if(e)
{
- WaypointSprite_UpdateMaxHealth(e, '1 0 0' * healtharmor_maxdamage(start_health, start_armorvalue, autocvar_g_balance_armor_blockpercent) * 2);
- WaypointSprite_UpdateHealth(e, '1 0 0' * healtharmor_maxdamage(carrier.health, carrier.armorvalue, autocvar_g_balance_armor_blockpercent));
+ WaypointSprite_UpdateMaxHealth(e, '1 0 0' * healtharmor_maxdamage(start_health, start_armorvalue, autocvar_g_balance_armor_blockpercent, DEATH_WEAPON) * 2);
+ WaypointSprite_UpdateHealth(e, '1 0 0' * healtharmor_maxdamage(carrier.health, carrier.armorvalue, autocvar_g_balance_armor_blockpercent, DEATH_WEAPON));
}
return e;
}