Bug Tracker – Bug 1120

Bad angle projectile with high entities' speed

Last modified: 2016-11-20 13:05:55 CST
Bug 1120 - (ARRAY(0x50ab1f8)) Bad angle projectile with high entities' speed
(ARRAY(0x50ab1f8))
Bad angle projectile with high entities' speed
Status: NEW
Product: Odamex
Classification: Unclassified
Component: Server & Client
0.7.x
All All
: P1 major
Depends on:
Blocks:
  Show dependency tree
 
Reported: 2014-09-25 10:23:36 CDT by Maëllig Desmottes
Modified: 2016-11-20 13:05 CST (History)
2 users (show)

See Also:


Attachments

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 CDT
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 CST
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 CST
0-X-Duel, NS duel is the perfect scenario for this. Rockets have been increased in speed.

﷒0﷓

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 CST
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 CDT
(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.
> 
> ﷒0﷓
> 
> 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: ﷒1
Comment 5 HeX_Vulture 2016-11-14 23:55:18 CST
Is this resolved?
Comment 6 Maëllig Desmottes 2016-11-20 13:05:55 CST
(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.