case 1:
// UP
g->sector->lightlevel += GLOWSPEED;
if (g->sector->lightlevel >= g->maxlight)
{
g->sector->lightlevel -= GLOWSPEED; g->direction = -1;
}
break;
}
} |
|
|
void P_SpawnGlowingLight(sector_t* |
sector) |
{ |
|
|
glow_t* |
g; |
|
g = Z_Malloc( sizeof(*g), PU_LEVSPEC, 0);
P_AddThinker(&g->thinker);
g->sector = sector;
g->minlight = P_FindMinSurroundingLight(sector,sector->lightlevel); g->maxlight = sector->lightlevel;
g->thinker.function.acp1 = (actionf_p1) T_Glow; g->direction = -1;
sector->special = 0;
}
9.10p local.h
// Emacs style mode select -*- C++ -*- //-----------------------------------------------------------------------------
//
//$Id:$
//Copyright (C) 1993-1996 by id Software, Inc.
//This program is free software; you can redistribute it and/or
//modify it under the terms of the GNU General Public License
//as published by the Free Software Foundation; either version 2
//of the License, or (at your option) any later version.
//
//This program is distributed in the hope that it will be useful,
//but WITHOUT ANY WARRANTY; without even the implied warranty of
//MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
//GNU General Public License for more details.
//
//DESCRIPTION:
//Play functions, animation, global header.
//-----------------------------------------------------------------------------
#ifndef __P_LOCAL__ #define __P_LOCAL__
#ifndef __R_LOCAL__ #include "r_local.h" #endif
#define FLOATSPEED |
(FRACUNIT*4) |