Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Strafing next to a wall and jumping makes player avoid damage #5

Open
Descen opened this issue Jan 5, 2023 · 2 comments
Open

Strafing next to a wall and jumping makes player avoid damage #5

Descen opened this issue Jan 5, 2023 · 2 comments
Assignees
Labels
question Further information is requested

Comments

@Descen
Copy link

Descen commented Jan 5, 2023

To say, "strafehumping" a wall then jumping at the right moment let's you avoid the damage from the projectile. Noticed this while testing my map, having a narrow 64 units wide corridor with the shooter at the end. Inside the corridor I pressed my move left key (A) next to the wall to gain extra momentum and when the projectile was near I jumped while still holding the strafe key. (I made the corridor in a way it's impossible to actually jump over the projectile). The projectile hit me while I was airborne, but dealt no damage, just simply ceased with the sound and impact sprite.
Jumping and strafing without "humping" the wall, the projectile can hurt you.

@Adambean
Copy link
Owner

Adambean commented Jan 5, 2023

The damage is dealt when something touches the projectile and a valid trace line can be made to the touching entity:

// Damage
TraceResult tr;
if (pOther !is null and pOther.pev.takedamage != DAMAGE_NO) {
// Hit an entity
g_Utility.TraceLine(self.pev.origin, pOther.pev.origin, dont_ignore_monsters, self.edict(), tr);
if (g_EntityFuncs.Instance(tr.pHit) == pOther) {

If you're seeing the projectile vanish on touch (e.g. an impact sprite/sound/trigger plays) this will mean there isn't a valid trace line between the projectile and hit entity.

Does armor damage work in this case? That doesn't depend on a trace line.

@Adambean Adambean added the question Further information is requested label Jan 5, 2023
@Descen
Copy link
Author

Descen commented Jan 5, 2023

Tried out with armor. No damage dealt to armor either.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants