set g_warmup 0 "split the game into a warmup- and match-stage when set to 1"
set g_warmup_limit 0 "if set to -1 the warmup-stage is not affected by any timelimit, if set to 0 the usual timelimit also affects warmup-stage, otherwise warmup will be limited to this time in SECONDS (useful for public matches)"
set g_warmup_allow_timeout 0 "if set to 1 timeouts can also be called in the warmup-stage, when sv_timeout is set to 1"
-set g_warmup_allguns 1 "if set players start with all guns in warmup mode"
+set g_warmup_allguns 1 "provide more weapons on start while in warmup: 0 = normal start weapons, 1 = all guns available on the map, 2 = all normal weapons"
set g_warmup_majority_factor 0.8 "minimum percentage of players ready needed for warmup to end"
set g_chat_nospectators 0 "if 0 spec/observer chat is always visible to the player, if 1 it is never visible to players, if 2 it is only visible to players during warmup stage"
r_cullentities_trace 0
// less "lagging" of other players, but also less PL tolerant... let's try this
-sv_clmovement_inputtimeout 0.07 // more than 2, less than 3 server frames
+sv_clmovement_inputtimeout 0.04 // more than 1, less than 2 server frames
// exact gloss looks better, e.g. on g-23
r_shadow_glossexact 1
player_skeleton.qc
../common/animdecide.qc
-
-../common/if-this-file-errors-scroll-up-and-fix-the-warnings.fteqccfail
// a dummy macro that prevents the "hanging ;" warning
#define ENDS_WITH_CURLY_BRACE
+#ifdef GMQCC
+# define ACCUMULATE_FUNCTION(func,otherfunc) \
+ [[accumulate]] void func() { otherfunc(); }
+# define CALL_ACCUMULATED_FUNCTION(func) \
+ func()
+#else
#ifdef HAVE_YO_DAWG_CPP
// TODO make ascii art pic of xzibit
// YO DAWG!
# define CALL_ACCUMULATED_FUNCTION(func) \
ACCUMULATE_call(#func)
#endif
+#endif
// used for simplifying ACCUMULATE_FUNCTIONs
#define SET_FIRST_OR_LAST(input,first,count) if(!input) { input = (first + count); }
../common/urllib.qc
../warpzonelib/mathlib.qc
-
-../common/if-this-file-errors-scroll-up-and-fix-the-warnings.fteqccfail
END_CHEAT_FUNCTION();
}
-float Drag(entity e, float grab, float ischeat);
+float Drag(float force_allow_pick, float ischeat);
void Drag_Begin(entity dragger, entity draggee, vector touchpoint);
void Drag_Finish(entity dragger);
float Drag_IsDraggable(entity draggee);
{
// use cheat dragging if cheats are enabled
crosshair_trace_plusvisibletriggers(self);
- Drag(trace_ent, TRUE, TRUE);
+ Drag(TRUE, TRUE);
}
else
{
- // drag is TRUE if the object can be picked up. While an object is being carried, the Drag() function
- // must execute for it either way, otherwise it would cause bugs if it went out of the player's trace.
- // This also makes sure that an object can only pe picked up if in range, but does not get dropped if
- // it goes out of range while slinging it around.
-
- float drag;
- crosshair_trace_plusvisibletriggers(self);
- drag = FALSE;
- if(vlen(self.origin - trace_ent.origin) <= autocvar_g_grab_range)
- {
- switch(trace_ent.grab)
- {
- case 0: // can't grab
- break;
- case 1: // owner can grab
- if(trace_ent.owner == self || trace_ent.realowner == self)
- drag = TRUE;
- break;
- case 2: // owner and team mates can grab
- if(SAME_TEAM(trace_ent.owner, self) || SAME_TEAM(trace_ent.realowner, self) || trace_ent.team == self.team)
- drag = TRUE;
- break;
- case 3: // anyone can grab
- drag = TRUE;
- break;
- default:
- break;
- }
- }
- Drag(trace_ent, drag, FALSE); // execute dragging
+ Drag(FALSE, FALSE); // execute dragging
}
break;
}
// ENTITY DRAGGING
-float Drag(entity e, float pick, float ischeat)
+float Drag(float force_allow_pick, float ischeat)
{
BEGIN_CHEAT_FUNCTION();
else
{
if(Drag_CanDrag(self))
- if(self.BUTTON_DRAG && pick)
+ if(self.BUTTON_DRAG)
{
- if(e)
+ crosshair_trace_plusvisibletriggers(self);
+ entity e = trace_ent;
+ float pick = force_allow_pick;
+ if (e && !pick)
+ {
+ // pick is TRUE if the object can be picked up. While an object is being carried, the Drag() function
+ // must execute for it either way, otherwise it would cause bugs if it went out of the player's trace.
+ // This also makes sure that an object can only pe picked up if in range, but does not get dropped if
+ // it goes out of range while slinging it around.
+
+ if(vlen(self.origin - e.origin) <= autocvar_g_grab_range)
+ {
+ switch(e.grab)
+ {
+ case 0: // can't grab
+ break;
+ case 1: // owner can grab
+ if(e.owner == self || e.realowner == self)
+ pick = TRUE;
+ break;
+ case 2: // owner and team mates can grab
+ if(SAME_TEAM(e.owner, self) || SAME_TEAM(e.realowner, self) || e.team == self.team)
+ pick = TRUE;
+ break;
+ case 3: // anyone can grab
+ pick = TRUE;
+ break;
+ default:
+ break;
+ }
+ }
+ }
+ // Find e and pick
+ if(e && pick)
if(Drag_IsDraggable(e))
{
if(ischeat)
self.ammo_fuel = warmup_start_ammo_fuel;
self.health = warmup_start_health;
self.armorvalue = warmup_start_armorvalue;
- self.weapons = warmup_start_weapons;
+ self.weapons = WARMUP_START_WEAPONS;
}
else
{
ear1 += v_right * -10;
ear2 += v_right * +10;
d = inflictor.origin - self.origin;
- f = (d * v_right) / vlen(d); // this is cos of angle of d and v_right!
+ if (d)
+ f = (d * v_right) / vlen(d); // this is cos of angle of d and v_right!
+ else
+ f = 0; // Assum ecenter.
force = v_right * vlen(force);
Violence_GibSplash_At(ear1, force * -1, 2, bound(0, damage, 25) / 2 * (0.5 - 0.5 * f), self, attacker);
Violence_GibSplash_At(ear2, force, 2, bound(0, damage, 25) / 2 * (0.5 + 0.5 * f), self, attacker);
}
if(warmup_stage)
- GiveFrags_randomweapons.weapons = warmup_start_weapons;
+ GiveFrags_randomweapons.weapons = WARMUP_START_WEAPONS;
else
GiveFrags_randomweapons.weapons = start_weapons;
WepSet warmup_start_weapons;
WepSet warmup_start_weapons_default;
WepSet warmup_start_weapons_defaultmask;
+#define WARMUP_START_WEAPONS ((g_warmup_allguns == 1) ? (warmup_start_weapons & (weaponsInMap | start_weapons)) : warmup_start_weapons)
float warmup_start_ammo_shells;
float warmup_start_ammo_nails;
float warmup_start_ammo_rockets;
for (i = WEP_FIRST; i <= WEP_LAST; ++i)
{
e = get_weaponinfo(i);
- float w = want_weapon("g_start_weapon_", e, cvar("g_warmup_allguns"));
+ float w = want_weapon("g_start_weapon_", e, g_warmup_allguns);
if(w & 1)
warmup_start_weapons |= WepSet_FromWeapon(i);
if(w & 2)
warmup_start_ammo_fuel = max(warmup_start_ammo_fuel, cvar("g_balance_fuel_rotstable"));
}
+ WepSet precache_weapons = start_weapons;
+ if (g_warmup_allguns != 1)
+ precache_weapons |= warmup_start_weapons;
for (i = WEP_FIRST; i <= WEP_LAST; ++i)
{
e = get_weaponinfo(i);
- if((start_weapons | warmup_start_weapons) & WepSet_FromWeapon(i))
+ if(precache_weapons & WepSet_FromWeapon(i))
weapon_action(i, WR_PRECACHE);
}
../common/test.qc
../common/util.qc
../common/notifications.qc
-
-../common/if-this-file-errors-scroll-up-and-fix-the-warnings.fteqccfail