Subversion Repositories eduke32

Compare Revisions

Ignore whitespace Rev 5015 → Rev 5016

/polymer/eduke32/source/gameexec.c
438,7 → 438,7
|| (hitspr->picnum == APLAYER && A_CheckEnemySprite(s)))
{
actor[iActor].flags |= SFLAG_NOFLOORSHADOW; // No shadows on actors
s->xvel = -256;
s->xvel = -256; // SLIDE_ABOVE_ENEMY
A_SetSprite(iActor, CLIPMASK0);
}
else if (s->statnum == STAT_PROJECTILE && hitspr->picnum == APLAYER && s->owner==florhit)
/polymer/eduke32/source/lunatic/test/thisactor_getzrange.con
0,0 → 1,51
// This CON module provides 'state thisactor_getzrange', reimplementing
// VM_GetZRange() from the C source. This routine obtains actor[].ceilingz and
// actor[].floorz for the current actor (THISACTOR), using getzrange() with the
// initial z position displaced by -256.
//
// Original author: Helixhorned.
 
 
// In
gamevar tagz_x 0 0
gamevar tagz_y 0 0
gamevar tagz_z 0 0
gamevar tagz_sectnum 0 0
 
// Temp
gamevar tagz_cstat 0 0
 
// Out
gamevar tagz_ceilz 0 0
gamevar tagz_ceilhit 0 0
gamevar tagz_florz 0 0
gamevar tagz_florhit 0 0
 
// ZOFFSET in the EDuke32 source.
define TAGZ_ZOFFSET 256
// In the EDuke32 source, the <walldist> passed to VM_GetZRange().
define TAGZ_WALLDIST 127
 
// Updates the current actor's actor[].floorz and actor[].ceilngz members in
// the same way A_GetZRange() does.
state thisactor_getzrange
setvarvar tagz_x sprite[THISACTOR].x
setvarvar tagz_y sprite[THISACTOR].y
setvarvar tagz_z sprite[THISACTOR].z, subvar tagz_z TAGZ_ZOFFSET
setvarvar tagz_sectnum sprite[THISACTOR].sectnum
 
// Back up and clear cstat.
setvarvar tagz_cstat sprite[THISACTOR].cstat
setactor[THISACTOR].cstat 0
 
getzrange tagz_x tagz_y tagz_z tagz_sectnum
/*out:*/ tagz_ceilz tagz_ceilhit tagz_florz tagz_florhit
/*in:*/ TAGZ_WALLDIST CLIPMASK0
 
// Restore cstat.
setactor[THISACTOR].cstat tagz_cstat
 
// Set actor[] members for the current actor.
setactor[THISACTOR].htceilingz tagz_ceilz
setactor[THISACTOR].htfloorz tagz_florz
ends
/polymer/eduke32/source/player.c
4210,7 → 4210,8
if ((sprite[j].cstat&33) == 33 || (sprite[j].cstat&17) == 17 ||
clipshape_idx_for_sprite(&sprite[j], -1) >= 0)
{
if ((sprite[j].xvel&1) == 0) // EDuke32 extension
// EDuke32 extension: xvel of 1 makes a sprite be never regarded as a bridge.
if ((sprite[j].xvel&1) == 0)
{
psectlotag = 0;
p->footprintcount = 0;
4220,7 → 4221,9
}
else if (A_CheckEnemySprite(&sprite[j]) && sprite[j].xrepeat > 24 && klabs(s->z-sprite[j].z) < (84<<8))
{
// I think this is what makes the player slide off enemies... might be a good sprite flag to add later
// TX: I think this is what makes the player slide off enemies... might
// be a good sprite flag to add later.
// Helix: there's also SLIDE_ABOVE_ENEMY.
j = getangle(sprite[j].x-p->pos.x,sprite[j].y-p->pos.y);
p->vel.x -= sintable[(j+512)&2047]<<4;
p->vel.y -= sintable[j&2047]<<4;