Zh/Prop ragdoll: Difference between revisions
(Created page with "<!-- When this page is updated to {{langsp}} or {{langsp}} instead of {{lang}}, please move {{this is a}} to the base page, as it is automatically translated. -->{{lang|Prop r...") |
No edit summary |
||
Line 1: | Line 1: | ||
<!-- When this page is updated to {{langsp}} or {{langsp}} instead of {{lang}}, please move {{this is a}} to the base page, as it is automatically translated. -->{{lang|Prop ragdoll}}{{seealso| | <!-- When this page is updated to {{langsp}} or {{langsp}} instead of {{lang}}, please move {{this is a}} to the base page, as it is automatically translated. -->{{lang|Prop ragdoll}}{{seealso|有关创建布娃娃的具体细节,详见{{ent|mode=name|$collisionjoints}}.}} | ||
{{CD|CRagdollProp|file1=1}} | {{CD|CRagdollProp|file1=1}} | ||
[[File:prop_ragdoll.jpg|thumb| | [[File:prop_ragdoll.jpg|thumb|不像NPC死亡时生成的布娃娃,地图制作者放置的布娃娃可以与环境动态的交互]] | ||
{{this is a|point entity|name=prop_ragdoll}} | {{this is a|point entity|name=prop_ragdoll}}是一个[[VPhysics|具有物理性质]]的[[Wikipedia:Ragdoll physics|布娃娃]]。布娃娃是一组约束在一起的物理对象的集合,用于模拟像尸体这样的关节物体,它们的物理模拟有着[[expensive|昂贵的性能开销]]. | ||
{{warning| | {{warning|该实体生成的是服务端布娃娃,会与任何道具发生碰撞,但这会造成大量网络开销。通过默认休眠(勾选Start asleep Flag),禁用物理运动或禁用与动态道具的碰撞({{not in FGD}}在soild键值中使用0为参数),并仅在需要时启用物理运动,可以显著减少网络开销}} | ||
{{bug| | {{bug|通过Hammer设置自定义动作并勾选<code>Start Asleep</code> Flag会导致渲染框无法更新,在生成时唤醒布娃娃一帧时间后再次休眠即可解决此问题}} | ||
{{bug|{{Portal2|4}} | {{bug|在{{Portal2|4}}中,布娃娃无法穿过传送门,这也在{{Portal|4}}中经常发生}} | ||
{{bug| | {{bug|[[Prediction|预测]]时会忽略布娃娃,这会在触摸布娃娃时导致大量的预测错误}} | ||
{{altnames|name1=physics_prop_ragdoll}} | {{altnames|name1=physics_prop_ragdoll}} | ||
{{Expand|title={{bms|4}} | {{Expand|title={{bms|4}}特定提示和漏洞| | ||
{{note| | {{note|原始版本仍可作为<code>prop_ragdoll_original</code>使用。区别在于: | ||
* <code>prop_ragdoll_original</code>无法通过爆炸造成碎尸 | |||
* 如果没有在Spawnflags勾选<code>[4] Debris</code>,撬棍的攻击可以击中<code>prop_ragdoll_original</code>(由于某些原因,撬棍的攻击判定会跳过<code>prop_ragdoll</code>) | |||
* <code>prop_ragdoll_original</code>没有流血效果且不会产生印花 | |||
* <code>prop_ragdoll_original</code>无法被拾取 | |||
* <code>prop_ragdoll_original</code>有真实的子弹推力效果 | |||
}} | |||
{{bug|<br/> | {{bug|<br/> | ||
* server side ragdolls created by NPCs never gib before loading save since the first Steam version, the same for gibs created by gibbed ragdolls. Use [https://community.lambdageneration.com/black-mesa/post/efesc2f8cyf the workshop addon] if you want to use server side ragdolls in your mod. | * server side ragdolls created by NPCs never gib before loading save since the first Steam version, the same for gibs created by gibbed ragdolls. Use [https://community.lambdageneration.com/black-mesa/post/efesc2f8cyf the workshop addon] if you want to use server side ragdolls in your mod. |
Revision as of 18:54, 6 August 2024
![]() |
---|
CRagdollProp |
![]() |
prop_ragdoll
是一个点实体 ,可在所有的 起源 游戏中使用。是一个具有物理性质的布娃娃。布娃娃是一组约束在一起的物理对象的集合,用于模拟像尸体这样的关节物体,它们的物理模拟有着昂贵的性能开销.


Start Asleep
Flag会导致渲染框无法更新,在生成时唤醒布娃娃一帧时间后再次休眠即可解决此问题 [todo tested in ?]
physics_prop_ragdoll
。
![]() prop_ragdoll_original 使用。区别在于:
![]()
|
Death Ragdolls/Ragdoll Transformation
When a NPC/player dies or an entity receives the BecomeRagdoll
input, it normally creates a client-side ragdoll and copies most of its animation and visual data to it. Unlike server-side prop_ragdolls, these client-side ragdolls are handled completely on a per-client basis and are much cheaper and simpler than their server-side counterparts, at the expense of being virtually nonexistent on the server, being inconsistent across client perspectives, and only colliding with entities that have physics objects on the client (e.g. worldspawn).
However, a NPC will become a server-side ragdoll while it's under any of the following conditions:
- The NPC is inside the volume of a trigger_serverragdoll
- The NPC is killed by a vehicle in singleplayer
- The gravity gun is supercharged
- The NPC dies on fire while in Alyx darkness mode
- The NPC is a vital ally (e.g., npc_alyx)
These server-side death ragdolls will collide with physics objects and beyond, like any prop_ragdoll, but they are marked as debris and do not collide with each other. They do not collide with themselves either, unlike client-side ragdolls (fixed in Entropy : Zero 2 and
黑山). This is believed to be intentional behavior to reduce performance/networking costs.


代码:This can be modified at
CBaseAnimating::CopyAnimationDataFrom()
inbaseanimating.cpp
for server-side ragdolls andC_BaseAnimating::CreateRagdollCopy()
inc_baseanimating.cpp
for client-side ragdolls.
Keyvalues
- Name (目标名称) <target_source>[ Edit ]
- 这个名称是其他实体通过 输入/输出 或其他 关键值 (如
parentname
或target
) 来引用该实体时使用的标识符。
该名称也会显示在 Hammer 编辑器的 2D 视图和 实体报告 中。参见: 所有实体均可使用的 通用键值、输入与输出
- Override Animation (angleOverride) <字符串 >
- Filled in by the engine via hammer_update_entity. Do not edit by hand except to clear.
GMODSandbox:
|
Flags
- Debris : [4]
- Don't collide with the player or other debris
- Use 'Least Recently Used' Retirement [澄清] : [4096] 不存在于FGD!
- Allow Dissolve : [8192]
- Motion Disabled : [16384]
- Allow stretch : [32768]
- Start asleep : [65536]
Inputs
- StartRagdollBoogie
- Begins ragdoll boogie effect for 5 seconds.
错误:This input is actually supposed to use a parameter for how long the ragdoll should boogie, but it uses the wrong field type in the data description. [todo tested in ?]
代码修复:In
CRagdollProp
's data description, findDEFINE_INPUTFUNC( FIELD_VOID, "StartRagdollBoogie", InputStartRadgollBoogie )
and replaceFIELD_VOID
withFIELD_FLOAT
.
- EnableMotion / DisableMotion
- Enable / disable physics simulation.
- AllowBloodPool (仅存在于
之中) 不存在于FGD!
- Сorpse once will create pool of blood (particle effect) if it is placed on brush.
注意:Not avaible for
prop_ragdoll_original
andprop_ragdoll_attached
.