git-svn-id: https://svn.eduke32.com/eduke32@1181 1a8010ca-5511-0410-912e-c29ae57300e0

This commit is contained in:
terminx 2008-12-13 21:01:33 +00:00
parent 660f01cf46
commit cd920963e3
3 changed files with 107 additions and 97 deletions

View file

@ -4750,12 +4750,21 @@ RECHECK:
i = 4;
do
{
cullcheckcnt++;
cullcheckcnt += 2;
if (cansee(globalposx, globalposy, globalposz, globalcursectnum,
tspr->x+x, tspr->y+y, tspr->z-(j*i)-512, datempsectnum))
return 1;
if (cansee(globalposx, globalposy, globalposz, globalcursectnum,
tspr->x+x, tspr->y+y, tspr->z-(j*(i-1))-512, datempsectnum))
return 1;
i -= 2;
}
while (--i > -1);
while (i);
cullcheckcnt++;
if (cansee(globalposx, globalposy, globalposz, globalcursectnum,
tspr->x+x, tspr->y+y, tspr->z-512, datempsectnum))
return 1;
if (x != y && x == oldx)
{

View file

@ -337,10 +337,11 @@ void A_Fall(int iActor)
{
if (sector[s->sectnum].lotag == 2 && s->zvel > 3122)
s->zvel = 3144;
if (s->zvel < 6144)
/* if (s->zvel < 6144)
s->zvel += c;
else s->zvel = 6144;
s->z += s->zvel;
s->z += s->zvel; */
s->z += s->zvel = min(6144, s->zvel+c);
}
if (s->z >= ActorExtra[iActor].floorz-(FOURSLEIGHT))
{
@ -369,7 +370,7 @@ int G_GetAngleDelta(int a,int na)
return (na-a);
}
static void X_AlterAng(int a)
static inline void X_AlterAng(int a)
{
intptr_t *moveptr = (intptr_t *)g_t[1];
int ticselapsed = (g_t[0])&31;
@ -687,8 +688,7 @@ static int X_DoExecute(void)
}
case CON_IFRND:
insptr++;
X_DoConditional(rnd(*insptr));
X_DoConditional(rnd(*(++insptr)));
break;
case CON_IFCANSHOOTTARGET:
@ -840,8 +840,8 @@ static int X_DoExecute(void)
if (g_t[5]) g_t[1] = *(((intptr_t *)g_t[5])+1); // move
g_sp->hitag = *(((intptr_t *)g_t[5])+2); // move flags
g_t[0] = g_t[2] = g_t[3] = 0; // count, actioncount... g_t[3] = ???
// if (A_CheckEnemySprite(g_sp) && g_sp->extra <= 0) // hack
// break;
if (A_CheckEnemySprite(g_sp) && g_sp->extra <= 0) // hack
break;
if (g_sp->hitag&random_angle)
g_sp->ang = krand()&2047;
break;
@ -1047,7 +1047,7 @@ static int X_DoExecute(void)
else if (G_CheckForSpaceFloor(g_sp->sectnum))
j = 0;
if (--ActorExtra[g_i].cgg == 0 || (sector[g_sp->sectnum].floorstat&2))
if (!ActorExtra[g_i].cgg-- || (sector[g_sp->sectnum].floorstat&2))
{
A_GetZLimits(g_i);
ActorExtra[g_i].cgg = 3;
@ -1435,90 +1435,90 @@ static int X_DoExecute(void)
break;
}
case CON_HEADSPRITESTAT:
insptr++;
{
int i=*insptr++;
j=Gv_GetVar(*insptr++, g_i, g_p);
if ((j < 0 || j > MAXSTATUS) && g_scriptSanityChecks)
{
OSD_Printf(CON_ERROR "invalid status list %d\n",g_errorLineNum,keyw[g_tw],j);
break;
}
Gv_SetVar(i,headspritestat[j],g_i,g_p);
break;
}
case CON_PREVSPRITESTAT:
insptr++;
{
int i=*insptr++;
j=Gv_GetVar(*insptr++, g_i, g_p);
if ((j < 0 || j >= MAXSPRITES) && g_scriptSanityChecks)
{
OSD_Printf(CON_ERROR "invalid sprite ID %d\n",g_errorLineNum,keyw[g_tw],j);
break;
}
Gv_SetVar(i,prevspritestat[j],g_i,g_p);
break;
}
case CON_NEXTSPRITESTAT:
insptr++;
{
int i=*insptr++;
j=Gv_GetVar(*insptr++, g_i, g_p);
if ((j < 0 || j >= MAXSPRITES) && g_scriptSanityChecks)
{
OSD_Printf(CON_ERROR "invalid sprite ID %d\n",g_errorLineNum,keyw[g_tw],j);
break;
}
Gv_SetVar(i,nextspritestat[j],g_i,g_p);
break;
}
case CON_HEADSPRITESECT:
insptr++;
{
int i=*insptr++;
j=Gv_GetVar(*insptr++, g_i, g_p);
if ((j < 0 || j > numsectors) && g_scriptSanityChecks)
{
OSD_Printf(CON_ERROR "invalid sector %d\n",g_errorLineNum,keyw[g_tw],j);
break;
}
Gv_SetVar(i,headspritesect[j],g_i,g_p);
break;
}
case CON_PREVSPRITESECT:
insptr++;
{
int i=*insptr++;
j=Gv_GetVar(*insptr++, g_i, g_p);
if ((j < 0 || j >= MAXSPRITES) && g_scriptSanityChecks)
{
OSD_Printf(CON_ERROR "invalid sprite ID %d\n",g_errorLineNum,keyw[g_tw],j);
break;
}
Gv_SetVar(i,prevspritesect[j],g_i,g_p);
break;
}
case CON_NEXTSPRITESECT:
insptr++;
{
int i=*insptr++;
j=Gv_GetVar(*insptr++, g_i, g_p);
if ((j < 0 || j >= MAXSPRITES) && g_scriptSanityChecks)
{
OSD_Printf(CON_ERROR "invalid sprite ID %d\n",g_errorLineNum,keyw[g_tw],j);
break;
}
Gv_SetVar(i,nextspritesect[j],g_i,g_p);
break;
}
case CON_HEADSPRITESTAT:
insptr++;
{
int i=*insptr++;
j=Gv_GetVar(*insptr++, g_i, g_p);
if ((j < 0 || j > MAXSTATUS) && g_scriptSanityChecks)
{
OSD_Printf(CON_ERROR "invalid status list %d\n",g_errorLineNum,keyw[g_tw],j);
break;
}
Gv_SetVar(i,headspritestat[j],g_i,g_p);
break;
}
case CON_PREVSPRITESTAT:
insptr++;
{
int i=*insptr++;
j=Gv_GetVar(*insptr++, g_i, g_p);
if ((j < 0 || j >= MAXSPRITES) && g_scriptSanityChecks)
{
OSD_Printf(CON_ERROR "invalid sprite ID %d\n",g_errorLineNum,keyw[g_tw],j);
break;
}
Gv_SetVar(i,prevspritestat[j],g_i,g_p);
break;
}
case CON_NEXTSPRITESTAT:
insptr++;
{
int i=*insptr++;
j=Gv_GetVar(*insptr++, g_i, g_p);
if ((j < 0 || j >= MAXSPRITES) && g_scriptSanityChecks)
{
OSD_Printf(CON_ERROR "invalid sprite ID %d\n",g_errorLineNum,keyw[g_tw],j);
break;
}
Gv_SetVar(i,nextspritestat[j],g_i,g_p);
break;
}
case CON_HEADSPRITESECT:
insptr++;
{
int i=*insptr++;
j=Gv_GetVar(*insptr++, g_i, g_p);
if ((j < 0 || j > numsectors) && g_scriptSanityChecks)
{
OSD_Printf(CON_ERROR "invalid sector %d\n",g_errorLineNum,keyw[g_tw],j);
break;
}
Gv_SetVar(i,headspritesect[j],g_i,g_p);
break;
}
case CON_PREVSPRITESECT:
insptr++;
{
int i=*insptr++;
j=Gv_GetVar(*insptr++, g_i, g_p);
if ((j < 0 || j >= MAXSPRITES) && g_scriptSanityChecks)
{
OSD_Printf(CON_ERROR "invalid sprite ID %d\n",g_errorLineNum,keyw[g_tw],j);
break;
}
Gv_SetVar(i,prevspritesect[j],g_i,g_p);
break;
}
case CON_NEXTSPRITESECT:
insptr++;
{
int i=*insptr++;
j=Gv_GetVar(*insptr++, g_i, g_p);
if ((j < 0 || j >= MAXSPRITES) && g_scriptSanityChecks)
{
OSD_Printf(CON_ERROR "invalid sprite ID %d\n",g_errorLineNum,keyw[g_tw],j);
break;
}
Gv_SetVar(i,nextspritesect[j],g_i,g_p);
break;
}
case CON_GETKEYNAME:
insptr++;
{
@ -4231,7 +4231,7 @@ void A_LoadActor(int iActor)
void A_Execute(int iActor,int iPlayer,int lDist)
{
int temp, temp2;
// int temp, temp2;
// if (actorscrptr[sprite[iActor].picnum] == 0) return;
@ -4283,7 +4283,7 @@ void A_Execute(int iActor,int iPlayer,int lDist)
}
X_Move();
/*
if (ud.angleinterpolation)
{
temp = (g_sp->ang & 2047) - sprpos[g_i].ang;
@ -4298,7 +4298,7 @@ void A_Execute(int iActor,int iPlayer,int lDist)
sprpos[g_i].ang &= 2047;
}
}
*/
if (g_sp->statnum == 6)
switch (DynamicTileMap[g_sp->picnum])
{

View file

@ -27,6 +27,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#include "osd.h"
*/
// this is all the crap for accessing the game's structs through the CON VM
// I got a 3-4 fps gain by inlining these...
static inline void X_AccessUserdef(int iSet, int lLabelID, int lVar2)
{