Opened 8 years ago

Last modified 8 years ago

#3610 closed enhancement

Projectiles do not cause any damage if the shooter dies — at Version 5

Reported by: vikas MK Owned by:
Priority: Nice to Have Milestone: Alpha 21
Component: UI & Simulation Keywords: patch
Cc: leper Patch:

Description (last modified by leper)

Currently, projectile Damage depends on the shooter being alive.

This should not be the case and to achieve that some of the related logic should be moved from simulation/components/Attack.js to cmpDamage (in the same directory, which would be a system component created from simulation/helpers/Damage.js)

cmpDamage should keep information about who fired (player/entity) and when the damage should be applied. Most of this information is already stored in the current Damage helper object.

cmpDamage then uses a delay (see cmpTimer and the current usage of it in cmpAttack) to cause this damage.

Note that this ticket enables doing #1912 and #1911 (and possibly #1910) without any huge changes.

Change History (6)

comment:1 by Stan, 8 years ago

Have a look at #1910. Also #1911 #1909 might help you design it.

Last edited 8 years ago by Stan (previous) (diff)

comment:2 by wraitii, 8 years ago

I think we need a CmpProjectileManager that will handle all projectiles, either as specific entities or as something special. This would also provide a convenient interface to check if we are obstructed by walls or other buildings for say, arrows, or ultimately provide realistic physics for cannonballs...

in reply to:  2 comment:3 by leper, 8 years ago

Replying to wraitii:

I think we need a CmpProjectileManager that will handle all projectiles, either as specific entities or as something special. This would also provide a convenient interface to check if we are obstructed by walls or other buildings for say, arrows, or ultimately provide realistic physics for cannonballs...

The projectile manager handles the visual only and is only used for rendering. Also this new component is usable for more things than just projectiles.

Having buildings block projectiles seems like asking for shitty performance, also I see no reason why that should be in a damage related component instead of eg cmpAttack. Physics for cannonballs should be a purely graphical thing and not related to the simulation at all.

comment:4 by leper, 8 years ago

Any updates?

comment:5 by leper, 8 years ago

Description: modified (diff)
Keywords: simple added; projectile system component removed
Summary: Moving missilehit from the shooter component to a system componentProjectiles do not cause any damage if the shooter dies

Note that there are some details (starting at 03:37) in this irc log: http://irclogs.wildfiregames.com/2015-11-15-QuakeNet-%230ad-dev.log

by Leander Hemelhof, 8 years ago

Changes the damage helper to a system component with the projectile hit handling logic

Note: See TracTickets for help on using tickets.