//************************************************************************** //** //** ## ## ## ## ## #### #### ### ### //** ## ## ## ## ## ## ## ## ## ## #### #### //** ## ## ## ## ## ## ## ## ## ## ## ## ## ## //** ## ## ######## ## ## ## ## ## ## ## ### ## //** ### ## ## ### ## ## ## ## ## ## //** # ## ## # #### #### ## ## //** //** $Id: PowerLightAmp.vc 2608 2007-08-09 22:30:09Z dj_jl $ //** //** Copyright (C) 1999-2006 Jānis Legzdiņš //** //** 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. //** //************************************************************************** class PowerLightAmp : Powerup; //========================================================================== // // DoEffect // //========================================================================== void DoEffect() { ::DoEffect(); if (Owner && Owner.bIsPlayer && Owner.Player.FixedColourmap != Inventory::INVERSECOLOURMAP) { if (EffectTime > PlayerEx::BLINKTHRESHOLD || (ftoi(4.0 * EffectTime) & 1)) { // almost full bright Owner.Player.FixedColourmap = 1; } else { Owner.Player.FixedColourmap = 0; } } } //========================================================================== // // EndEffect // //========================================================================== void EndEffect() { if (Owner && Owner.bIsPlayer && Owner.Player.FixedColourmap != Inventory::INVERSECOLOURMAP) { Owner.Player.FixedColourmap = 0; } } defaultproperties { EffectTime = 120.0; }