Merge branch 'master' into scripting

Conflicts:
	src/g_shared/a_randomspawner.cpp
	src/g_strife/a_strifeweapons.cpp
	src/thingdef/thingdef_parse.cpp
	wadsrc/static/actors/constants.txt
This commit is contained in:
Christoph Oelckers 2013-09-03 09:01:28 +02:00
commit 251cdacf26
30 changed files with 168 additions and 57 deletions

View file

@ -73,7 +73,6 @@ static FRandom pr_script("FScript");
#define AngleToFixed(x) ((((double) x) / ((double) ANG45/45)) * FRACUNIT)
#define FixedToAngle(x) ((((double) x) / FRACUNIT) * ANG45/45)
#define FIXED_TO_FLOAT(f) ((f)/(float)FRACUNIT)
// functions. FParser::SF_ means Script Function not, well.. heh, me
@ -1417,11 +1416,11 @@ void FParser::SF_PointToDist(void)
if (CheckArgs(4))
{
// Doing this in floating point is actually faster with modern computers!
float x = floatvalue(t_argv[2]) - floatvalue(t_argv[0]);
float y = floatvalue(t_argv[3]) - floatvalue(t_argv[1]);
double x = floatvalue(t_argv[2]) - floatvalue(t_argv[0]);
double y = floatvalue(t_argv[3]) - floatvalue(t_argv[1]);
t_return.type = svt_fixed;
t_return.value.f = (fixed_t)(sqrtf(x*x+y*y)*65536.f);
t_return.value.f = FLOAT2FIXED(sqrt(x*x+y*y)*65536.f);
}
}