mirror of
https://github.com/ZDoom/qzdoom.git
synced 2024-11-10 23:02:08 +00:00
- Fixed: Thing_ProjectileIntercept broke slightly when converted to the new
vector math routines (almost two years ago!) because the original code multiplied down columns of the rotation matrix, but the new code multiplies across rows of the matrix instead. This is remedied by flipping the matrix across the x=y axis by reversing the sign of the sine value passed to the matrix constructor. SVN r1324 (trunk)
This commit is contained in:
parent
45fc728f2e
commit
48be3f7022
2 changed files with 10 additions and 2 deletions
|
@ -1,3 +1,11 @@
|
||||||
|
December 17, 2008
|
||||||
|
- Fixed: Thing_ProjectileIntercept broke slightly when converted to the new
|
||||||
|
vector math routines (almost two years ago!) because the original code
|
||||||
|
multiplied down columns of the rotation matrix, but the new code multiplies
|
||||||
|
across rows of the matrix instead. This is remedied by flipping the matrix
|
||||||
|
across the x=y axis by reversing the sign of the sine value passed to the
|
||||||
|
matrix constructor.
|
||||||
|
|
||||||
December 15, 2008
|
December 15, 2008
|
||||||
- Fixed: Autoloading a game (e.g. respawning after dying in single player)
|
- Fixed: Autoloading a game (e.g. respawning after dying in single player)
|
||||||
during demo playback prematurely ended demo control of the player.
|
during demo playback prematurely ended demo control of the player.
|
||||||
|
|
|
@ -173,7 +173,7 @@ bool P_Thing_Move (int tid, AActor *source, int mapspot, bool fog)
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool P_Thing_Projectile (int tid, AActor *source, int type, const char * type_name, angle_t angle,
|
bool P_Thing_Projectile (int tid, AActor *source, int type, const char *type_name, angle_t angle,
|
||||||
fixed_t speed, fixed_t vspeed, int dest, AActor *forcedest, int gravity, int newtid,
|
fixed_t speed, fixed_t vspeed, int dest, AActor *forcedest, int gravity, int newtid,
|
||||||
bool leadTarget)
|
bool leadTarget)
|
||||||
{
|
{
|
||||||
|
@ -288,7 +288,7 @@ bool P_Thing_Projectile (int tid, AActor *source, int type, const char * type_na
|
||||||
double ydotx = -aim | tvel;
|
double ydotx = -aim | tvel;
|
||||||
double a = acos (clamp (ydotx / targspeed / dist, -1.0, 1.0));
|
double a = acos (clamp (ydotx / targspeed / dist, -1.0, 1.0));
|
||||||
double multiplier = double(pr_leadtarget.Random2())*0.1/255+1.1;
|
double multiplier = double(pr_leadtarget.Random2())*0.1/255+1.1;
|
||||||
double sinb = clamp (targspeed*multiplier * sin(a) / fspeed, -1.0, 1.0);
|
double sinb = -clamp (targspeed*multiplier * sin(a) / fspeed, -1.0, 1.0);
|
||||||
|
|
||||||
// Use the cross product of two of the triangle's sides to get a
|
// Use the cross product of two of the triangle's sides to get a
|
||||||
// rotation vector.
|
// rotation vector.
|
||||||
|
|
Loading…
Reference in a new issue