This article's documentation is for anything that uses the Source engine. Click here for more information.

Prop physics multiplayer: Difference between revisions

From Valve Developer Community
Jump to navigation Jump to search
m (Add internal name of Physics Mode keyval key)
No edit summary
 
(14 intermediate revisions by 7 users not shown)
Line 1: Line 1:
{{base_point|prop_physics_multiplayer}} It is identical to [[prop_physics]] except that it bounces away from collision (if [[sv_turbophysics]] is enabled), which helps to avoid the prediction errors that normal physics objects typically generate.  
{{CD|CPhysicsPropMultiplayer|file1=props.cpp}}
{{bug|The Name keyvalue does not function correctly in Source 2007. A workaround is to create a [[logic_auto]] or [[logic_relay]] with an addoutput,targetname output.}}
{{this is a|model entity|name=prop_physics_multiplayer}} It is identical to [[prop_physics]] except that it bounces away from collision (if [[sv_turbophysics]] is enabled), which helps to avoid the prediction errors that normal physics objects typically generate, and that physics mode can be changed.
{{todo|Test if this issue has been fixed in later versions of Source.}}
 
{{AltNames|name1=prop_physics|game={{l4ds|4}}|misc=CPhysicsPropMultiplayer doesn't seem to be present {{l4ds}} and physicsmode keyvalue works when used on prop_physics}}


== Keyvalues ==
== Keyvalues ==
{{KV|Physics Mode|intn=physicsmode|choices|Sets the physics mode used by the prop.}}
{{KV|Physics Mode|intn=physicsmode|choices|Sets the physics mode used by the prop.
: {{physicsmode choices}}
:* 0: "Auto Detect"
{{KV RenderFields}}
:* 1: "Solid, Server-side"
{{KV BasePropPhysics}}
:* 2: "Non-Solid, Server-side"
 
:* 3: "Non-Solid, Client-side"
== Flags ==
}}
{{Fl BasePropPhysics}}
:{{important|If physicsmode is 0 or 3 then this can create a clientside physical prop which cannot be controlled via I/O, vscript or picked up and doesn't count towards server entity limits other than for a moment during spawning. {{warning|In singleplayer where save/load is available it won't get saved into a save file. It instead always respawns at its original position, but only if at least one server-side entity uses the same model. This is because otherwise the model is not precached (see output of command <code>cl_precacheinfo modelprecache</code>)}}
 
}}
== Inputs ==
{{IO|Ignite|Ignite, burst into flames.}}
{{IO|IgniteLifetime|<code>Ignite</code> with the given lifetime. {{todo|Before the flames extinguish, or before health reaches zero?}}|param=float}}
{{IO|IgniteNumHitboxFires|<code>Ignite</code> with the given number of hitbox fires.|param=integer}}
{{IO|IgniteHitboxFireScale|<code>Ignite</code> with the given hitbox fire scale.|param=float}}
{{I BasePropPhysics}}
{{I RenderFields}}


== Outputs ==
{{OtherKIO|prop_physics}}
{{O BasePropPhysics}}


== See also ==
== See also ==
* {{ent|prop_data}}
* [[Prop Types Overview]]
** {{ent|prop_physics}}
** {{ent|prop_physics_respawnable}}
** {{ent|prop_physics_override}}
** {{ent|prop_sphere}}
** {{ent|prop_dynamic}}
** {{ent|prop_static}}
** {{ent|prop_ragdoll}}
* [[Alternate Multiplayer Physics]] - an article on modifying the source code to this entity.
* [[Alternate Multiplayer Physics]] - an article on modifying the source code to this entity.


[[Category:Physics]]
[[Category:Physics]]
[[Category:Prop entities|physics multiplayer]]

Latest revision as of 01:55, 1 June 2025

C++ Class hierarchy
CPhysicsPropMultiplayer
CPhysicsProp
CBreakableProp
CBaseProp
CBaseAnimating
CBaseEntity
C++ props.cpp

prop_physics_multiplayer is a model entity available in all Source Source games. It is identical to prop_physics except that it bounces away from collision (if sv_turbophysics is enabled), which helps to avoid the prediction errors that normal physics objects typically generate, and that physics mode can be changed.

AltNames.pngAltNames: In Left 4 Dead seriesLeft 4 Dead series Left 4 Dead series, this entity is also tied to prop_physics. CPhysicsPropMultiplayer doesn't seem to be present Left 4 Dead seriesLeft 4 Dead series and physicsmode keyvalue works when used on prop_physics

Keyvalues

Physics Mode (physicsmode) <choices>
Sets the physics mode used by the prop.
  • 0: "Auto Detect"
  • 1: "Solid, Server-side"
  • 2: "Non-Solid, Server-side"
  • 3: "Non-Solid, Client-side"
Icon-Important.pngImportant:If physicsmode is 0 or 3 then this can create a clientside physical prop which cannot be controlled via I/O, vscript or picked up and doesn't count towards server entity limits other than for a moment during spawning.
Warning.pngWarning:In singleplayer where save/load is available it won't get saved into a save file. It instead always respawns at its original position, but only if at least one server-side entity uses the same model. This is because otherwise the model is not precached (see output of command cl_precacheinfo modelprecache)
Note.pngNote:Other Keyvalues / Inputs / Outputs are same as prop_physics.

See also