Bug Tracker – Bug 1120

Bad angle projectile with high entities' speed

Last modified: 2016-11-20 13:05:55 UTC
Bug 1120 - Bad angle projectile with high entities' speed
Summary: Bad angle projectile with high entities' speed
Status: NEW
Alias: None
Product: Odamex
Classification: Unclassified
Component: Server & Client (show other bugs)
Version: 0.7.x (Old)
Hardware: All All
: P1 major
Assignee: Odamex Bug Reporter
URL:
Depends on:
Blocks:
 
Reported: 2014-09-25 10:23 UTC by Maëllig Desmottes
Modified: 2016-11-20 13:05 UTC (History)
2 users (show)

See Also:

Attachments

Add an attachment (proposed patch, testcase, etc.)

Note You need to log in before you can comment on or make changes to this bug.
Description Maëllig Desmottes 2014-09-25 10:23:36 UTC
When a player shoots a projectile with a higher value (through dehacked --SECOND BUG TO FIX, and this one is CRITICAL, as it can mess up gameplay, especially with projectile going at extreme low speed--, the angles given from the projectile to the server is completely wrong. Maybe because of a miscalculation somewhere?
Comment 1 Mike Lightner 2014-12-29 06:21:15 UTC
Do you have anything we can use to reproduce this scenario, like a wad and/or demo?
Comment 2 Maëllig Desmottes 2015-02-11 13:35:44 UTC
0-X-Duel, NS duel is the perfect scenario for this. Rockets have been increased in speed.

http://dl.baseq.fr/doom/wads/0-X-Duel-RC1.zip

if you launch a rocket, the rocket will spawn, but going at a speed of 0. Dehacked support for this line was found, but not applied at all.

So, there is a line of code you need to add in d_dehacked.cpp to bring back the speed!

in static int PatchThing (int thingy):

Find this line:

            else DPrintf (unknown_str, Line1, "Thing", thingNum);
        } else if (!stricmp (Line1, "Height")) {
            hadHeight = true;
        }

Add right after:

// Ch0wW: Speed dehacked was added but not applied. Incomplete features a-hoy!
		else if (!stricmp (Line1, "Speed"))
			info->speed *= FRACUNIT;

Now, once you spawn a rocket, the speed is applied, but the angles is not totally wrong.
Comment 3 Maëllig Desmottes 2015-02-11 13:39:08 UTC
Now, once you spawn a rocket, the speed is applied, but the angles ARE totally wrong. *

As far as I remember, it looks like a value of FRACUNIT * 17 starts to mess up the angles. Below that value, it seems fine.

0-X-Duel seems to use a value of 38.
Comment 4 Russell Rice 2016-09-22 00:55:40 UTC
(In reply to Maëllig Desmottes from comment #2)
> 0-X-Duel, NS duel is the perfect scenario for this. Rockets have been
> increased in speed.
> 
> http://dl.baseq.fr/doom/wads/0-X-Duel-RC1.zip
> 
> if you launch a rocket, the rocket will spawn, but going at a speed of 0.
> Dehacked support for this line was found, but not applied at all.
> 
> So, there is a line of code you need to add in d_dehacked.cpp to bring back
> the speed!
> 
> in static int PatchThing (int thingy):
> 
> Find this line:
> 
>             else DPrintf (unknown_str, Line1, "Thing", thingNum);
>         } else if (!stricmp (Line1, "Height")) {
>             hadHeight = true;
>         }
> 
> Add right after:
> 
> // Ch0wW: Speed dehacked was added but not applied. Incomplete features
> a-hoy!
> 		else if (!stricmp (Line1, "Speed"))
> 			info->speed *= FRACUNIT;
> 
> Now, once you spawn a rocket, the speed is applied, but the angles is not
> totally wrong.

Applied in r5483, thanks!

(In reply to Maëllig Desmottes from comment #3)
> Now, once you spawn a rocket, the speed is applied, but the angles ARE
> totally wrong. *
> 
> As far as I remember, it looks like a value of FRACUNIT * 17 starts to mess
> up the angles. Below that value, it seems fine.
> 
> 0-X-Duel seems to use a value of 38.

Found some info on this: https://www.doomworld.com/vb/doom-editing/19081-projectile-speed-bad-aim/
Comment 5 HeX_Vulture 2016-11-14 23:55:18 UTC
Is this resolved?
Comment 6 Maëllig Desmottes 2016-11-20 13:05:55 UTC
(In reply to HeX_Vulture from comment #5)
> Is this resolved?

it's partially fixed. The dehacked speed has been fixed, but not the angles.