Delta-v icon indicating copy to clipboard operation
Delta-v copied to clipboard

Deal damage when dragging downed people

Open sowelipililimute opened this issue 9 months ago • 11 comments

About the PR

Species now take damage when being dragged on the floor in a dead or critical state.

Why / Balance

  • we have rollerbeds
  • maybe let the medical professional come and get the patient instead of leaving a bloody trail to medical

Technical details

  • new DamageOnDragComponent & its system that gets added to existing mob protototypes

Media

https://github.com/user-attachments/assets/3a554082-58de-47cb-bf31-dc968385ef77

Requirements

  • [x] I have tested all added content and changes.
  • [x] I have added media to this PR or it does not require an ingame showcase.

Changelog

:cl:

  • add: Dragging downed people on the floor now deals damage to them

sowelipililimute avatar Mar 12 '25 03:03 sowelipililimute

also add a terminating check to not damage deleting entities

deltanedas avatar Mar 12 '25 10:03 deltanedas

I ask that you please test how this interacts with dead people that are wearing skates, because I've already had a moment where I died with skates on and someone bumped me into a wall and my leg came off :,) So please make sure this doesn't fuck someone up extremely all because they have skates on.

HTMLSystem avatar Mar 12 '25 14:03 HTMLSystem

Direction approved 👍

SolStar2 avatar Mar 13 '25 07:03 SolStar2

that isn't a computation of velocity, the distance is what we care about, not distance over time.

sowelipililimute avatar Mar 17 '25 00:03 sowelipililimute

that isn't a computation of velocity, the distance is what we care about, not distance over time.

Why just distance? Doesn't the function get called repeatedly every tick when entity is moved? It turns out distance over time regardless. To be precise, currently it's calculating distance over tick.

nkokic avatar Mar 17 '25 01:03 nkokic

Why just distance?

because. how far you drag someone on the floor determines how much damage they take. that is the current design.

sowelipililimute avatar Mar 17 '25 05:03 sowelipililimute

how far you drag someone on the floor determines how much damage they take. that is the current design.

I have dug into code and found out that MoveEvent is raised when physics updates, meaning the function is called each tick while object is moving. Calculating the location change between ticks technically is velocity -> location change rate in one tick, dividing with deltaTima would get you location change in one second. However, I just realized my suggestion would have been counter productive, so do NOT put deltaTime.

Adding damage is like an integrator, and integrators would look like this: totalDamage += damageGain * velocity[m/s] * deltaTime[s/tick];

Which would eventually look like this if we cross out units: totalDamage += damageGain * velocity[m/tick]; This line is similar to your code's behavior and your code applies damage over velocity correctly.

Sorry to bother you.

nkokic avatar Mar 17 '25 11:03 nkokic

as something to consider, impstation tried this and reverted it at https://github.com/impstation/imp-station-14/pull/78. im open to trying it here too but it might be worth keeping the things mentioned there in mind!

foxcurl avatar Mar 17 '25 13:03 foxcurl

this is true, chair meta needs to be prevented with only rollerbeds, and to an extent bodybags, removing it. a chair should do very little compared to a stretcher

deltanedas avatar Mar 17 '25 13:03 deltanedas

Does impstation have fireman carry? Surely delta players are more likely to carry instead of drag.

The chair meta could be prevented by incapacitated characters dropping from chairs. Realistically you cannot make an incapacitated victim sit down tight unless buckled with seat belt. Okay! This would be funny: you put an incapacitated person on chair and mids the transport, they at random fall off the chair and take minor blunt damage. Fireman carry and (mobility) beds could prevent this.

nkokic avatar Mar 17 '25 13:03 nkokic

@sowelipililimute Hey, are you still working on this? I'd love to see this merged and I'm willing to take over this PR if you are no longer interested in continuing it.

Quanteey avatar May 23 '25 09:05 Quanteey

@sowelipililimute Hey, are you still working on this? I'd love to see this merged and I'm willing to take over this PR if you are no longer interested in continuing it.

Toby222 avatar Jun 23 '25 07:06 Toby222

we getting manslaughter charges with this

AveriV2 avatar Jul 24 '25 11:07 AveriV2

someone can revive it if they want this is clearly abandoned

deltanedas avatar Jul 24 '25 13:07 deltanedas