A couple of minor fixes and comments that got accumulated in my tree.

git-svn-id: https://svn.eduke32.com/eduke32@2709 1a8010ca-5511-0410-912e-c29ae57300e0
This commit is contained in:
helixhorned 2012-05-29 20:01:55 +00:00
parent 7cd44d6cdb
commit 35d989646e
8 changed files with 15 additions and 11 deletions

View file

@ -14040,6 +14040,7 @@ int32_t getceilzofslope(int16_t sectnum, int32_t dax, int32_t day)
walltype *wal; walltype *wal;
wal = &wall[sector[sectnum].wallptr]; wal = &wall[sector[sectnum].wallptr];
// ceil(sqrt(2**31-1)) == 46341
dx = wall[wal->point2].x-wal->x; dy = wall[wal->point2].y-wal->y; dx = wall[wal->point2].x-wal->x; dy = wall[wal->point2].y-wal->y;
i = (nsqrtasm(dx*dx+dy*dy)<<5); if (i == 0) return(sector[sectnum].ceilingz); i = (nsqrtasm(dx*dx+dy*dy)<<5); if (i == 0) return(sector[sectnum].ceilingz);
j = dmulscale3(dx,day-wal->y,-dy,dax-wal->x); j = dmulscale3(dx,day-wal->y,-dy,dax-wal->x);

View file

@ -5877,6 +5877,7 @@ ACTOR_STATIC void G_MoveEffectors(void) //STATNUM 3
g_player[p].ps->bobposy += x; g_player[p].ps->bobposy += x;
g_player[p].ps->ang += q; g_player[p].ps->ang += q;
g_player[p].ps->ang &= 2047;
if (g_netServer || numplayers > 1) if (g_netServer || numplayers > 1)
{ {

View file

@ -748,6 +748,8 @@ static void MultiPskyInit(void)
Bmemset(pskymultioff[i], 0, sizeof(pskymultioff[i])); Bmemset(pskymultioff[i], 0, sizeof(pskymultioff[i]));
} }
// KEEPINSYNC with Polymer MAX OFFSET = 4
// MOONSKY1 // MOONSKY1
// earth mountian mountain sun // earth mountian mountain sun
pskymultioff[0][6]=1; pskymultioff[0][6]=1;

View file

@ -3587,7 +3587,7 @@ void G_DrawRooms(int32_t snum, int32_t smoothratio)
} }
else if (software_screen_tilting) else if (software_screen_tilting)
{ {
int32_t oviewingrange = viewingrange; // save it from setviewtotile() int32_t oviewingrange = viewingrange; // save it from setaspect()
const int16_t tang = (ud.screen_tilting) ? p->rotscrnang : 0; const int16_t tang = (ud.screen_tilting) ? p->rotscrnang : 0;
// To render a tilted screen in high quality, we need at least // To render a tilted screen in high quality, we need at least

View file

@ -5637,8 +5637,7 @@ repeatcase:
if (g_scriptVersion == 14) if (g_scriptVersion == 14)
{ {
g_spriteDeleteQueueSize = params[j++]; g_spriteDeleteQueueSize = params[j++];
if (g_spriteDeleteQueueSize > 1024) g_spriteDeleteQueueSize = 1024; g_spriteDeleteQueueSize = clamp(g_spriteDeleteQueueSize, 0, 1024);
else if (g_spriteDeleteQueueSize < 0) g_spriteDeleteQueueSize = 0;
g_tripbombLaserMode = params[j++]; g_tripbombLaserMode = params[j++];
} }

View file

@ -93,6 +93,7 @@ void VM_ScriptInfo(void)
initprintf("g_errorLineNum: %d, g_tw: %d\n",g_errorLineNum,g_tw); initprintf("g_errorLineNum: %d, g_tw: %d\n",g_errorLineNum,g_tw);
} }
// May recurse, e.g. through EVENT_XXX -> ... -> EVENT_KILLIT
int32_t VM_OnEvent(int32_t iEventID, int32_t iActor, int32_t iPlayer, int32_t lDist, int32_t iReturn) int32_t VM_OnEvent(int32_t iEventID, int32_t iActor, int32_t iPlayer, int32_t lDist, int32_t iReturn)
{ {
#ifdef LUNATIC_ENABLE #ifdef LUNATIC_ENABLE
@ -428,12 +429,12 @@ int32_t G_GetAngleDelta(int32_t a,int32_t na)
return (na-a); return (na-a);
} }
GAMEEXEC_STATIC GAMEEXEC_INLINE void VM_AlterAng(int32_t a) GAMEEXEC_STATIC void VM_AlterAng(int32_t a)
{ {
int32_t ticselapsed = (vm.g_t[0])&31; int32_t ticselapsed = (vm.g_t[0])&31;
const intptr_t *moveptr; const intptr_t *moveptr;
if ((unsigned)vm.g_t[1] >= (unsigned)g_scriptSize) if ((unsigned)vm.g_t[1] >= (unsigned)g_scriptSize-1)
{ {
vm.g_t[1] = 0; vm.g_t[1] = 0;
@ -914,8 +915,7 @@ skip_check:
vm.g_sp->hitag = *(script + vm.g_t[5] + 2); // move flags vm.g_sp->hitag = *(script + vm.g_t[5] + 2); // move flags
vm.g_t[0] = vm.g_t[2] = vm.g_t[3] = 0; // count, actioncount... vm.g_t[3] = ?? vm.g_t[0] = vm.g_t[2] = vm.g_t[3] = 0; // count, actioncount... vm.g_t[3] = ??
if (A_CheckEnemySprite(vm.g_sp) && vm.g_sp->extra <= 0) // hack if (!A_CheckEnemySprite(vm.g_sp) || vm.g_sp->extra > 0) // hack
continue;
if (vm.g_sp->hitag&random_angle) if (vm.g_sp->hitag&random_angle)
vm.g_sp->ang = krand()&2047; vm.g_sp->ang = krand()&2047;
continue; continue;

View file

@ -566,7 +566,8 @@ static void __fastcall VM_AccessUserdef(int32_t iSet, int32_t lLabelID, int32_t
case USERDEFS_DETAIL: case USERDEFS_DETAIL:
if (iSet) if (iSet)
{ {
ud.detail = lValue; // REMINDER: must implement "boolean" setters like this in Lunatic, too.
ud.detail = !!lValue;
return; return;
} }
Gv_SetVarX(lVar2, ud.detail); Gv_SetVarX(lVar2, ud.detail);

View file

@ -44,7 +44,7 @@ int32_t A_CallSound(int32_t sn,int32_t whatsprite)
for (SPRITES_OF_SECT(sn, i)) for (SPRITES_OF_SECT(sn, i))
{ {
if (PN == MUSICANDSFX && SLT < 1000) if (PN == MUSICANDSFX && (unsigned)SLT < 1000)
{ {
if (whatsprite == -1) whatsprite = i; if (whatsprite == -1) whatsprite = i;