set g_maplist_check_waypoints 0 "when 1, maps are skipped if there currently are bots, but the map has no waypoints"
set samelevel 0 "when 1, always play the same level over and over again"
+ set g_grab_range 200 "distance at which dragable objects can be grabbed"
+
set g_cloaked 0 "display all players mostly invisible"
set g_player_alpha 1
set g_player_brightness 0 "set to 2 for brighter players"
seta g_balance_cloaked_alpha 0.25
+ set g_sandbox 0 "allow players to spawn and edit objects around the map"
+ set g_sandbox_info 1 "print object information to the server. 1 prints info about spawned / removed objects, 2 also prints info about edited objects"
+ set g_sandbox_readonly 0 "when this mode is active, players cannot modify objects or use any sandbox commands"
+ set g_sandbox_storage_name default "name of the selected storage to use"
+ set g_sandbox_storage_autosave 5 "storage is automatically saved every specified number of seconds"
+ set g_sandbox_storage_autoload 1 "if a storage file exists for the given map, automatically load it at startup"
+ set g_sandbox_editor_flood 1 "players must wait this many seconds between spawning objects"
+ set g_sandbox_editor_maxobjects 1000 "maximum number of objects that may exist at a time"
+ set g_sandbox_editor_free 1 "0 = players can only copy or edit their own objects, 1 = players can copy but not edit other objects, 2 = players can copy and edit all object"
+ set g_sandbox_editor_distance_spawn 200 "distance at which objects spawn in front of the player"
+ set g_sandbox_editor_distance_edit 300 "distance at which players can edit or remove objects they are looking at"
+ set g_sandbox_object_scale_min 0.1 "minimum scale that objects can be set to"
+ set g_sandbox_object_scale_max 2 "maximum scale that objects can be set to"
+ set g_sandbox_object_material_velocity_min 100 "velocity objects must have while colliding for material effects to be applied"
+ set g_sandbox_object_material_velocity_factor 0.002 "velocity range which decides the intensity of material effects"
+ set cl_sandbox_clipboard ""
+
+ seta menu_sandbox_spawn_model ""
+ seta menu_sandbox_attach_bone ""
+ seta menu_sandbox_edit_skin 0
+ seta menu_sandbox_edit_alpha 1
+ seta menu_sandbox_edit_color_main "1 1 1"
+ seta menu_sandbox_edit_color_glow "1 1 1"
+ seta menu_sandbox_edit_frame 0
+ seta menu_sandbox_edit_scale 1
+ seta menu_sandbox_edit_physics 1
+ seta menu_sandbox_edit_force 1
+ seta menu_sandbox_edit_material ""
+
+ alias menu_showsandboxtools "menu_cmd directmenu SandboxTools"
+ bind f7 menu_showsandboxtools
+
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 g_spawn_furthest 0.5 "this amount of the spawns shall be far away from any players"
set g_spawn_useallspawns 0 "use all spawns, e.g. also team spawns in non-teamplay, and all spawns, even enemy spawns, in teamplay"
+set g_spawn_near_teammate 0 "if set, players prefer spawns near a team mate"
+set g_spawn_near_teammate_distance 640 "max distance to consider a spawn to be near a team mate"
// respawn delay
set g_respawn_delay 2 "number of seconds you have to wait before you can respawn again"
set g_respawn_waves 0 "respawn in waves (every n seconds), intended to decrease overwhelming base attacks"
alias reload "impulse 20"
+ alias sandbox "cmd g_sandbox $*"
+
// movement
bind w +forward
bind a +moveleft
bind BACKSPACE dropweapon
bind g dropweapon
bind f +use
+ bind v +button8 // drag object
// misc
bind e +hook
#define autocvar_slowmo cvar("slowmo")
float autocvar_snd_soundradius;
float autocvar_spawn_debug;
-float autocvar_spawn_debugview;
float autocvar_speedmeter;
float autocvar_sv_accelerate;
var float autocvar_sv_accuracy_data_share = 1;
float autocvar_g_trueaim_minrange;
float autocvar_g_debug_defaultsounds;
float autocvar_g_loituma;
+ float autocvar_g_grab_range;
+ float autocvar_g_sandbox_info;
+ float autocvar_g_sandbox_readonly;
+ string autocvar_g_sandbox_storage_name;
+ float autocvar_g_sandbox_storage_autosave;
+ float autocvar_g_sandbox_storage_autoload;
+ float autocvar_g_sandbox_editor_flood;
+ float autocvar_g_sandbox_editor_maxobjects;
+ float autocvar_g_sandbox_editor_free;
+ float autocvar_g_sandbox_editor_distance_spawn;
+ float autocvar_g_sandbox_editor_distance_edit;
+ float autocvar_g_sandbox_object_scale_min;
+ float autocvar_g_sandbox_object_scale_max;
+ float autocvar_g_sandbox_object_material_velocity_min;
+ float autocvar_g_sandbox_object_material_velocity_factor;
.float clip_size;
.float minelayer_mines;
+ .float grab; // 0 = can't grab, 1 = owner can grab, 2 = owner and team mates can grab, 3 = anyone can grab
+
#define PROJECTILE_MAKETRIGGER(e) (e).solid = SOLID_CORPSE; (e).dphitcontentsmask = DPCONTENTS_SOLID | DPCONTENTS_BODY | DPCONTENTS_CORPSE
// when doing this, hagar can go through clones
// #define PROJECTILE_MAKETRIGGER(e) (e).solid = SOLID_BBOX
.float misc_bulletcounter; // replaces uzi & hlac bullet counter.
void PlayerUseKey();
+
+typedef vector(entity player, entity spot, vector current) spawn_evalfunc_t;
+.spawn_evalfunc_t spawn_evalfunc;
{
traceline_antilag(pl, pl.cursor_trace_start, pl.cursor_trace_start + normalize(pl.cursor_trace_endpos - pl.cursor_trace_start) * MAX_SHOT_DISTANCE, MOVE_NORMAL, pl, ANTILAG_LATENCY(pl));
}
+ void crosshair_trace_plusvisibletriggers(entity pl)
+ {
+ entity first;
+ entity e;
+ first = findchainfloat(solid, SOLID_TRIGGER);
+
+ for (e = first; e; e = e.chain)
+ if (e.model != "")
+ e.solid = SOLID_BSP;
+
+ crosshair_trace(pl);
+
+ for (e = first; e; e = e.chain)
+ e.solid = SOLID_TRIGGER;
+ }
void WarpZone_traceline_antilag (entity source, vector v1, vector v2, float nomonst, entity forent, float lag);
void WarpZone_crosshair_trace(entity pl)
{
MUTATOR_ADD(mutator_rocketflying);
if(cvar("g_vampire"))
MUTATOR_ADD(mutator_vampire);
+ if(cvar("g_spawn_near_teammate"))
+ MUTATOR_ADD(mutator_spawn_near_teammate);
+
++ // is this a mutator? is this a mode?
+ if(cvar("g_sandbox"))
+ MUTATOR_ADD(sandbox);
+
if(cvar("sv_allow_fullbright"))
serverflags |= SERVERFLAG_ALLOW_FULLBRIGHT;
// called when a player becomes observer, after shared setup
MUTATOR_HOOKABLE(PlayerSpawn);
+ entity spawn_spot; // spot that was used, or world
// called when a player spawns as player, after shared setup, before his weapon is chosen (so items may be changed in here)
MUTATOR_HOOKABLE(ClientDisconnect);
}
*/
+MUTATOR_HOOKABLE(Spawn_Score);
+ // called when a spawnpoint is being evaluated
+ // return 1 to make the spawnpoint unusable
+ // INPUT
+ entity self; // player wanting to spawn
+ entity spawn_spot; // spot to be evaluated
+ // IN+OUT
+ vector spawn_score; // _x is priority, _y is "distance"
++
+ MUTATOR_HOOKABLE(SV_StartFrame);
+ // runs globally each server frame
MUTATOR_DECLARATION(mutator_dodging);
MUTATOR_DECLARATION(mutator_rocketflying);
MUTATOR_DECLARATION(mutator_vampire);
-
+MUTATOR_DECLARATION(mutator_spawn_near_teammate);
+
+ MUTATOR_DECLARATION(sandbox);
mutators/mutator_dodging.qc
mutators/mutator_rocketflying.qc
mutators/mutator_vampire.qc
+mutators/mutator_spawn_near_teammate.qc
+ mutators/sandbox.qc
../warpzonelib/anglestransform.qc
../warpzonelib/mathlib.qc
RuneMatchGivePoints();
bot_serverframe();
- if(autocvar_spawn_debugview)
- {
- RandomSelection_Init();
- for(self = world; (self = find(self, classname, "player")); )
- RandomSelection_Add(self, 0, string_null, 1, 0);
- self = RandomSelection_chosen_ent;
- SelectSpawnPoint(0);
- }
-
FOR_EACH_PLAYER(self)
self.porto_forbidden = max(0, self.porto_forbidden - 1);
+
+ MUTATOR_CALLHOOK(SV_StartFrame);
}
.vector originjitter;