FTEQW
Documentation of the FTE engine source tree.
sv_phys.c File Reference

Functions

void WPhys_Init (void)
 
void WPhys_CheckVelocity (world_t *w, wedict_t *ent)
 
qboolean WPhys_RunThink (world_t *w, wedict_t *ent)
 
qboolean WPhys_Push (world_t *w, wedict_t *pusher, vec3_t move, vec3_t amove)
 
void SV_ProgStartFrame (void)
 
void WPhys_MoveChain (world_t *w, wedict_t *ent, wedict_t *movechain, float *initial_origin, float *initial_angle)
 
void WPhys_RunEntity (world_t *w, wedict_t *ent)
 
void WPhys_RunNewmis (world_t *w)
 
trace_t WPhys_Trace_Toss (world_t *w, wedict_t *tossent, wedict_t *ignore)
 
void World_Physics_Frame (world_t *w)
 
qboolean SV_Physics (void)
 
void SV_SetMoveVars (void)
 

Variables

cvar_t sv_maxvelocity = CVAR("sv_maxvelocity","10000")
 
cvar_t sv_gravity = CVAR( "sv_gravity", "800")
 
cvar_t sv_stopspeed = CVAR( "sv_stopspeed", "100")
 
cvar_t sv_maxspeed = CVAR( "sv_maxspeed", "320")
 
cvar_t sv_spectatormaxspeed = CVAR( "sv_spectatormaxspeed", "500")
 
cvar_t sv_accelerate = CVAR( "sv_accelerate", "10")
 
cvar_t sv_airaccelerate = CVAR( "sv_airaccelerate", "0.7")
 
cvar_t sv_wateraccelerate = CVAR( "sv_wateraccelerate", "10")
 
cvar_t sv_friction = CVAR( "sv_friction", "4")
 
cvar_t sv_waterfriction = CVAR( "sv_waterfriction", "4")
 
cvar_t sv_wallfriction = CVARD( "sv_wallfriction", "1", "Additional friction when running into walls")
 
cvar_t sv_gameplayfix_noairborncorpse = CVAR( "sv_gameplayfix_noairborncorpse", "0")
 
cvar_t sv_gameplayfix_multiplethinks = CVARAD("sv_gameplayfix_multiplethinks", "1", "sv_gameplayfix_multiplethinksperframe", "Enables multiple thinks per entity per frame so small nextthink times are accurate. QuakeWorld mods expect a value of 1, while NQ expects 0.")
 
cvar_t sv_gameplayfix_stepdown = CVARD( "sv_gameplayfix_stepdown", "0", "Attempt to step down steps, instead of only up them. Affects non-predicted movetype_walk.")
 
cvar_t sv_gameplayfix_bouncedownslopes = CVARD( "sv_gameplayfix_grenadebouncedownslopes", "0", "MOVETYPE_BOUNCE speeds are calculated relative to the impacted surface, instead of the vertical, reducing the chance of grenades just sitting there on slopes.")
 
cvar_t sv_gameplayfix_trappedwithin = CVARD( "sv_gameplayfix_trappedwithin", "0", "Blocks further entity movement when an entity is already inside another entity. This ensures that bsp precision issues cannot allow the entity to completely pass through eg the world.")
 
cvar_t sv_gameplayfix_spawnbeforethinks = CVARD( "sv_gameplayfix_spawnbeforethinks", "0", "Fixes an issue where player thinks (including Pre+Post) can be called before PutClientInServer. Unfortunately at least one mod depends upon PreThink being called first in order to correctly determine spawn positions.")
 
cvar_t dpcompat_noretouchground = CVARD( "dpcompat_noretouchground", "0", "Prevents entities that are already standing on an entity from touching the same entity again.")
 
cvar_t sv_sound_watersplash = CVAR( "sv_sound_watersplash", "misc/h2ohit1.wav")
 
cvar_t sv_sound_land = CVAR( "sv_sound_land", "demon/dland2.wav")
 
cvar_t sv_stepheight = CVARAFD("pm_stepheight", "", "sv_stepheight", CVAR_SERVERINFO, "If empty, the value "STRINGIFY(PM_DEFAULTSTEPHEIGHT)" will be used instead. This is the size of the step you can step up or down.")
 
cvar_t sv_nqplayerphysics
 
cvar_t pm_ktjump = CVARF("pm_ktjump", "", CVAR_SERVERINFO)
 
cvar_t pm_bunnyspeedcap = CVARFD("pm_bunnyspeedcap", "", CVAR_SERVERINFO, "0 or 1, ish. If the player is traveling faster than this speed while turning, their velocity will be gracefully reduced to match their current maxspeed. You can still rocket-jump to gain high velocity, but turning will reduce your speed back to the max. This can be used to disable bunny hopping.")
 
cvar_t pm_watersinkspeed = CVARFD("pm_watersinkspeed", "", CVAR_SERVERINFO, "This is the speed that players will sink at while inactive in water. Empty means 60.")
 
cvar_t pm_flyfriction = CVARFD("pm_flyfriction", "", CVAR_SERVERINFO, "Amount of friction that applies in fly or 6dof mode. Empty means 4.")
 
cvar_t pm_slidefix = CVARFD("pm_slidefix", "", CVAR_SERVERINFO, "Fixes an issue when walking down slopes (ie: so they act more like slopes and not a series of steps)")
 
cvar_t pm_slidyslopes = CVARFD("pm_slidyslopes", "", CVAR_SERVERINFO, "Replicates NQ behaviour, where players will slowly slide down ramps. Generally requires 'pm_noround 1' too, otherwise the effect rounds to nothing.")
 
cvar_t pm_bunnyfriction = CVARFD("pm_bunnyfriction", "", CVAR_SERVERINFO, "Replicates NQ behaviour, ensuring that there's at least a frame of friction while jumping - friction is proportional to tick rate.")
 
cvar_t pm_autobunny = CVARFD("pm_autobunny", "", CVAR_SERVERINFO, "Players will continue jumping without needing to release the jump button.")
 
cvar_t pm_airstep = CVARAFD("pm_airstep", "", "sv_jumpstep", CVAR_SERVERINFO, "Allows players to step up while jumping. This makes stairs more graceful but also increases potential jump heights.")
 
cvar_t pm_pground = CVARFD("pm_pground", "", CVAR_SERVERINFO, "Use persisten onground state instead of recalculating every frame."CON_WARNING"Do NOT use with nq mods, as most nq mods will interfere with onground state, resulting in glitches.")
 
cvar_t pm_stepdown = CVARFD("pm_stepdown", "", CVAR_SERVERINFO, "Causes physics to stick to the ground, instead of constantly losing traction whiloe going down steps.")
 
cvar_t pm_walljump = CVARFD("pm_walljump", "", CVAR_SERVERINFO, "Allows the player to bounce off walls while arborne.")
 
cvar_t pm_edgefriction = CVARAFD("pm_edgefriction", "", "edgefriction", CVAR_SERVERINFO, "Increases friction when about to walk over a cliff, so you're less likely to plummet by mistake. When empty defaults to 2, but uses a tracebox instead of a traceline to detect the drop.")
 

Function Documentation

◆ SV_Physics()

qboolean SV_Physics ( void  )

◆ SV_ProgStartFrame()

void SV_ProgStartFrame ( void  )

◆ SV_SetMoveVars()

void SV_SetMoveVars ( void  )

◆ World_Physics_Frame()

void World_Physics_Frame ( world_t w)

◆ WPhys_CheckVelocity()

void WPhys_CheckVelocity ( world_t w,
wedict_t ent 
)

◆ WPhys_Init()

void WPhys_Init ( void  )

◆ WPhys_MoveChain()

void WPhys_MoveChain ( world_t w,
wedict_t ent,
wedict_t movechain,
float *  initial_origin,
float *  initial_angle 
)

◆ WPhys_Push()

qboolean WPhys_Push ( world_t w,
wedict_t pusher,
vec3_t  move,
vec3_t  amove 
)

◆ WPhys_RunEntity()

void WPhys_RunEntity ( world_t w,
wedict_t ent 
)

◆ WPhys_RunNewmis()

void WPhys_RunNewmis ( world_t w)

◆ WPhys_RunThink()

qboolean WPhys_RunThink ( world_t w,
wedict_t ent 
)

◆ WPhys_Trace_Toss()

trace_t WPhys_Trace_Toss ( world_t w,
wedict_t tossent,
wedict_t ignore 
)

Variable Documentation

◆ dpcompat_noretouchground

cvar_t dpcompat_noretouchground = CVARD( "dpcompat_noretouchground", "0", "Prevents entities that are already standing on an entity from touching the same entity again.")

◆ pm_airstep

cvar_t pm_airstep = CVARAFD("pm_airstep", "", "sv_jumpstep", CVAR_SERVERINFO, "Allows players to step up while jumping. This makes stairs more graceful but also increases potential jump heights.")

◆ pm_autobunny

cvar_t pm_autobunny = CVARFD("pm_autobunny", "", CVAR_SERVERINFO, "Players will continue jumping without needing to release the jump button.")

◆ pm_bunnyfriction

cvar_t pm_bunnyfriction = CVARFD("pm_bunnyfriction", "", CVAR_SERVERINFO, "Replicates NQ behaviour, ensuring that there's at least a frame of friction while jumping - friction is proportional to tick rate.")

◆ pm_bunnyspeedcap

cvar_t pm_bunnyspeedcap = CVARFD("pm_bunnyspeedcap", "", CVAR_SERVERINFO, "0 or 1, ish. If the player is traveling faster than this speed while turning, their velocity will be gracefully reduced to match their current maxspeed. You can still rocket-jump to gain high velocity, but turning will reduce your speed back to the max. This can be used to disable bunny hopping.")

◆ pm_edgefriction

cvar_t pm_edgefriction = CVARAFD("pm_edgefriction", "", "edgefriction", CVAR_SERVERINFO, "Increases friction when about to walk over a cliff, so you're less likely to plummet by mistake. When empty defaults to 2, but uses a tracebox instead of a traceline to detect the drop.")

◆ pm_flyfriction

cvar_t pm_flyfriction = CVARFD("pm_flyfriction", "", CVAR_SERVERINFO, "Amount of friction that applies in fly or 6dof mode. Empty means 4.")

◆ pm_ktjump

cvar_t pm_ktjump = CVARF("pm_ktjump", "", CVAR_SERVERINFO)

◆ pm_pground

cvar_t pm_pground = CVARFD("pm_pground", "", CVAR_SERVERINFO, "Use persisten onground state instead of recalculating every frame."CON_WARNING"Do NOT use with nq mods, as most nq mods will interfere with onground state, resulting in glitches.")

◆ pm_slidefix

cvar_t pm_slidefix = CVARFD("pm_slidefix", "", CVAR_SERVERINFO, "Fixes an issue when walking down slopes (ie: so they act more like slopes and not a series of steps)")

◆ pm_slidyslopes

cvar_t pm_slidyslopes = CVARFD("pm_slidyslopes", "", CVAR_SERVERINFO, "Replicates NQ behaviour, where players will slowly slide down ramps. Generally requires 'pm_noround 1' too, otherwise the effect rounds to nothing.")

◆ pm_stepdown

cvar_t pm_stepdown = CVARFD("pm_stepdown", "", CVAR_SERVERINFO, "Causes physics to stick to the ground, instead of constantly losing traction whiloe going down steps.")

◆ pm_walljump

cvar_t pm_walljump = CVARFD("pm_walljump", "", CVAR_SERVERINFO, "Allows the player to bounce off walls while arborne.")

◆ pm_watersinkspeed

cvar_t pm_watersinkspeed = CVARFD("pm_watersinkspeed", "", CVAR_SERVERINFO, "This is the speed that players will sink at while inactive in water. Empty means 60.")

◆ sv_accelerate

cvar_t sv_accelerate = CVAR( "sv_accelerate", "10")

◆ sv_airaccelerate

cvar_t sv_airaccelerate = CVAR( "sv_airaccelerate", "0.7")

◆ sv_friction

cvar_t sv_friction = CVAR( "sv_friction", "4")

◆ sv_gameplayfix_bouncedownslopes

cvar_t sv_gameplayfix_bouncedownslopes = CVARD( "sv_gameplayfix_grenadebouncedownslopes", "0", "MOVETYPE_BOUNCE speeds are calculated relative to the impacted surface, instead of the vertical, reducing the chance of grenades just sitting there on slopes.")

◆ sv_gameplayfix_multiplethinks

cvar_t sv_gameplayfix_multiplethinks = CVARAD("sv_gameplayfix_multiplethinks", "1", "sv_gameplayfix_multiplethinksperframe", "Enables multiple thinks per entity per frame so small nextthink times are accurate. QuakeWorld mods expect a value of 1, while NQ expects 0.")

◆ sv_gameplayfix_noairborncorpse

cvar_t sv_gameplayfix_noairborncorpse = CVAR( "sv_gameplayfix_noairborncorpse", "0")

◆ sv_gameplayfix_spawnbeforethinks

cvar_t sv_gameplayfix_spawnbeforethinks = CVARD( "sv_gameplayfix_spawnbeforethinks", "0", "Fixes an issue where player thinks (including Pre+Post) can be called before PutClientInServer. Unfortunately at least one mod depends upon PreThink being called first in order to correctly determine spawn positions.")

◆ sv_gameplayfix_stepdown

cvar_t sv_gameplayfix_stepdown = CVARD( "sv_gameplayfix_stepdown", "0", "Attempt to step down steps, instead of only up them. Affects non-predicted movetype_walk.")

◆ sv_gameplayfix_trappedwithin

cvar_t sv_gameplayfix_trappedwithin = CVARD( "sv_gameplayfix_trappedwithin", "0", "Blocks further entity movement when an entity is already inside another entity. This ensures that bsp precision issues cannot allow the entity to completely pass through eg the world.")

◆ sv_gravity

cvar_t sv_gravity = CVAR( "sv_gravity", "800")

◆ sv_maxspeed

cvar_t sv_maxspeed = CVAR( "sv_maxspeed", "320")

◆ sv_maxvelocity

cvar_t sv_maxvelocity = CVAR("sv_maxvelocity","10000")

◆ sv_nqplayerphysics

cvar_t sv_nqplayerphysics
extern

◆ sv_sound_land

cvar_t sv_sound_land = CVAR( "sv_sound_land", "demon/dland2.wav")

◆ sv_sound_watersplash

cvar_t sv_sound_watersplash = CVAR( "sv_sound_watersplash", "misc/h2ohit1.wav")

◆ sv_spectatormaxspeed

cvar_t sv_spectatormaxspeed = CVAR( "sv_spectatormaxspeed", "500")

◆ sv_stepheight

cvar_t sv_stepheight = CVARAFD("pm_stepheight", "", "sv_stepheight", CVAR_SERVERINFO, "If empty, the value "STRINGIFY(PM_DEFAULTSTEPHEIGHT)" will be used instead. This is the size of the step you can step up or down.")

◆ sv_stopspeed

cvar_t sv_stopspeed = CVAR( "sv_stopspeed", "100")

◆ sv_wallfriction

cvar_t sv_wallfriction = CVARD( "sv_wallfriction", "1", "Additional friction when running into walls")

◆ sv_wateraccelerate

cvar_t sv_wateraccelerate = CVAR( "sv_wateraccelerate", "10")

◆ sv_waterfriction

cvar_t sv_waterfriction = CVAR( "sv_waterfriction", "4")