Add possibility to move voxels/models via maphacks

# Conflicts:
#	source/build/src/engine.cpp
#	source/build/src/polymer.cpp
#	source/build/src/polymost.cpp
#	source/duke3d/src/lunatic/con_lang.lua
#	source/rr/src/lunatic/con_lang.lua
This commit is contained in:
CommonLoon102 2019-12-31 20:35:28 +01:00 committed by Christoph Oelckers
parent 95eb10d2a6
commit bc4a4bea23
9 changed files with 136 additions and 49 deletions

View file

@ -1035,7 +1035,7 @@ int32_t polymost_voxdraw(voxmodel_t *m, tspriteptr_t const tspr)
f = (float) tspr->yrepeat * k0;
m0.z *= f; a0.z *= f;
k0 = (float) tspr->z;
k0 = (float) (tspr->z+spriteext[tspr->owner].position_offset.z);
f = ((globalorientation&8) && (sprite[tspr->owner].cstat&48)!=0) ? -4.f : 4.f;
k0 -= (tspr->yoffset*tspr->yrepeat)*f*m->bscale;
zoff = m->siz.z*.5f;
@ -1053,8 +1053,8 @@ int32_t polymost_voxdraw(voxmodel_t *m, tspriteptr_t const tspr)
int const shadowHack = !!(tspr->clipdist & TSPR_FLAGS_MDHACK);
m0.y *= f; a0.y = (((float)(tspr->x-globalposx)) * (1.f/1024.f) + a0.y) * f;
m0.x *=-f; a0.x = (((float)(tspr->y-globalposy)) * -(1.f/1024.f) + a0.x) * -f;
m0.y *= f; a0.y = (((float)(tspr->x+spriteext[tspr->owner].position_offset.x-globalposx)) * (1.f/1024.f) + a0.y) * f;
m0.x *=-f; a0.x = (((float)(tspr->y+spriteext[tspr->owner].position_offset.y-globalposy)) * -(1.f/1024.f) + a0.x) * -f;
m0.z *= g; a0.z = (((float)(k0 -globalposz - shadowHack)) * -(1.f/16384.f) + a0.z) * g;
float mat[16];