djcev.com

//

Git Repos / fte_dogmode / qc / func / brush.qc

Last update to this file was on 2024-03-24 at 02:40.

Show brush.qc

//==============================================================================
// func_brush
//==============================================================================

//----------------------------------------------------------------------
// crashes in QS at the moment Jaycie is looking into it
//----------------------------------------------------------------------

//======================================================================
// constants
//======================================================================

const float BRUSH_START_INVISIBLE = 1;
const float BRUSH_START_NONSOLID = 2;
const float BRUSH_START_ALTFRAMES = 4;
const float BRUSH_TOGGLE_VISIBILITY = 8;
const float BRUSH_TOGGLE_SOLIDITY = 16;
const float BRUSH_TOGGLE_FRAMES = 32;

//======================================================================
// fields
//======================================================================

/*
.float solidstate;
.float visiblestate;
*/

#if 0
//----------------------------------------------------------------------
void() func_brush_use =
{
if (self.spawnflags & BRUSH_TOGGLE_VISIBILITY)
{
if (self.visiblestate == 1)
{
self.model = "";
self.visiblestate = 0;
}
else
{
self.model = self.mdl;
self.visiblestate = 1;
}
}
if (self.spawnflags & BRUSH_TOGGLE_SOLIDITY)
{
if (self.solidstate == 1)
{
self.solid = SOLID_NOT;
self.solidstate = 0;
}
else
{
self.solid = SOLID_BSP;
setorigin(self, self.origin);
self.solidstate = 1;
}
}
if (self.spawnflags & BRUSH_TOGGLE_FRAMES)
self.frame = 1 - self.frame;
};

//----------------------------------------------------------------------
void() func_brush =
{
self.angles = '0 0 0';
self.movetype = MOVETYPE_NONE;
self.use = func_brush_use;
setmodel (self, self.model);
self.mdl = self.model;
setorigin (self, self.origin);

if (self.spawnflags & BRUSH_START_INVISIBLE)
{
self.visiblestate = 0;
self.model = "";
}
else
{
self.visiblestate = 1;
}

if (self.spawnflags & BRUSH_START_NONSOLID)
{
self.solidstate = 0;
self.solid = SOLID_NOT;
}
else
{
self.solidstate = 1;
self.solid = SOLID_BSP;
}

if (self.spawnflags & BRUSH_START_ALTFRAMES)
self.frame = 1;
else
self.frame = 0;
};
#endif

Return to the top of this page or return to the overview of this repo.

Log brush.qc

Date Commit Message Author + -
2024-03-24 2nd pass refactor, rework QC class structure cev +16 -7
2024-01-09 Continue OO / Class-based refactor cev +15 -13
2023-11-27 Code reorg, minor movement changes, misc cev +89  

Return to the top of this page or return to the overview of this repo.