mirror of
https://github.com/ZDoom/raze-gles.git
synced 2025-01-26 08:50:55 +00:00
Another 64-bit crash fix
git-svn-id: https://svn.eduke32.com/eduke32@1685 1a8010ca-5511-0410-912e-c29ae57300e0
This commit is contained in:
parent
219b3204dd
commit
b336d43f75
1 changed files with 12 additions and 1 deletions
|
@ -380,9 +380,15 @@ int32_t G_GetAngleDelta(int32_t a,int32_t na)
|
||||||
|
|
||||||
GAMEEXEC_STATIC GAMEEXEC_INLINE void VM_AlterAng(int32_t a)
|
GAMEEXEC_STATIC GAMEEXEC_INLINE void VM_AlterAng(int32_t a)
|
||||||
{
|
{
|
||||||
intptr_t *moveptr = (intptr_t *)vm.g_t[1];
|
intptr_t *moveptr;
|
||||||
int32_t ticselapsed = (vm.g_t[0])&31;
|
int32_t ticselapsed = (vm.g_t[0])&31;
|
||||||
|
|
||||||
|
if ((moveptr = (intptr_t *)vm.g_t[1]) < &script[0] || moveptr > (&script[0]+g_scriptSize))
|
||||||
|
{
|
||||||
|
vm.g_t[1] = 0;
|
||||||
|
OSD_Printf(CON_ERROR "%s %d bad moveptr for actor %d (%d)!\n",g_errorLineNum, keyw[g_tw], vm.g_i, vm.g_sp->picnum);
|
||||||
|
}
|
||||||
|
|
||||||
vm.g_sp->xvel += (*moveptr-vm.g_sp->xvel)/5;
|
vm.g_sp->xvel += (*moveptr-vm.g_sp->xvel)/5;
|
||||||
if (vm.g_sp->zvel < 648) vm.g_sp->zvel += ((*(moveptr+1)<<4)-vm.g_sp->zvel)/5;
|
if (vm.g_sp->zvel < 648) vm.g_sp->zvel += ((*(moveptr+1)<<4)-vm.g_sp->zvel)/5;
|
||||||
|
|
||||||
|
@ -515,6 +521,11 @@ GAMEEXEC_STATIC void VM_Move(void)
|
||||||
if (a&geth) vm.g_sp->xvel += ((*moveptr)-vm.g_sp->xvel)>>1;
|
if (a&geth) vm.g_sp->xvel += ((*moveptr)-vm.g_sp->xvel)>>1;
|
||||||
if (a&getv) vm.g_sp->zvel += ((*(moveptr+1)<<4)-vm.g_sp->zvel)>>1;
|
if (a&getv) vm.g_sp->zvel += ((*(moveptr+1)<<4)-vm.g_sp->zvel)>>1;
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
vm.g_t[1] = 0;
|
||||||
|
OSD_Printf(CON_ERROR "%s %d bad moveptr for actor %d (%d)!\n",g_errorLineNum, keyw[g_tw], vm.g_i, vm.g_sp->picnum);
|
||||||
|
}
|
||||||
|
|
||||||
if (a&dodgebullet && !deadflag)
|
if (a&dodgebullet && !deadflag)
|
||||||
A_Dodge(vm.g_sp);
|
A_Dodge(vm.g_sp);
|
||||||
|
|
Loading…
Reference in a new issue