And it only affect m_vecPosition2, may be you could just alter that last one for your needs.
What you mean "admin doors", how it is related to lip value ?
-Edit-
m_flLip is 32 (on windows), linux diff could be 4 or 5 i dunno.
You can alter it before the ent spawn, or directly in spawn (pre-hook) using set_pdata_float(iDoor, m_flLip, FloatValue, LinuxDiff)
If you want to find linux diff, run this on linux server and look at server console at map start :
PHP Code:
#include <amxmodx>
#include <engine>
#include <fakemeta>
#define VERSION "0.0.1"
public plugin_init()
{
register_plugin("Door Lip Offset", VERSION, "ConnorMcLeod")
Create_Door()
}
public plugin_precache()
{
new iEnt = create_entity("func_door")
if( iEnt )
{
DispatchSpawn(iEnt)
remove_entity(iEnt)
}
}
Create_Door()
{
new iEnt = create_entity("func_door")
if( iEnt )
{
DispatchKeyValue(iEnt, "lip", "0.1337")
DispatchSpawn(iEnt)
if( pev_valid(iEnt) == 2 )
{
for(new i=1; i<100; i++)
{
if( get_pdata_float(iEnt, i, 0) == 0.1337 )
{
server_print("Offset %d could be m_flLip", i)
}
}
}
else
{
server_print("Not valid ent %d", iEnt)
}
}
}
From HLSDK, doors offsets should be :
Code:
const m_toggle_state = 28
const m_flActivateFinished = 29//like attack_finished, but for doors
const m_flMoveDistance = 30// how far a door should slide or rotate
const m_flWait = 31
const m_flLip = 32
const m_flTWidth = 33// for plats
const m_flTLength = 34// for plats
const m_vecPosition1_x = 35;
const m_vecPosition1_y = 36
const m_vecPosition1_z = 37
/*
Vector m_vecPosition2; 38 39 40
Vector m_vecAngle1; 41 42 43
Vector m_vecAngle2; 44 45 46
*/
const m_cTriggersLeft = 47; // trigger_counter only, # of activations remaining
const m_flHeight = 48;
const m_hActivator = 49
// void (CBaseToggle::*m_pfnCallWhenMoveDone)(void); // 50 ?
/* Vector m_vecFinalDest; //51 52 53 ?
Vector m_vecFinalAngle; // 54 55 56
int m_bitsDamageInflict; // 57 ? */
Code:
class CBaseToggle : public CBaseAnimating
{
public:
void KeyValue( KeyValueData *pkvd );
TOGGLE_STATE m_toggle_state;
float m_flActivateFinished;//like attack_finished, but for doors
float m_flMoveDistance;// how far a door should slide or rotate
float m_flWait;
float m_flLip;
float m_flTWidth;// for plats
float m_flTLength;// for plats
Vector m_vecPosition1;
Vector m_vecPosition2;
Vector m_vecAngle1;
Vector m_vecAngle2;
int m_cTriggersLeft; // trigger_counter only, # of activations remaining
float m_flHeight;
EHANDLE m_hActivator;
void (CBaseToggle::*m_pfnCallWhenMoveDone)(void);
Vector m_vecFinalDest;
Vector m_vecFinalAngle;
int m_bitsDamageInflict; // DMG_ damage type that the door or tigger does
virtual int Save( CSave &save );
virtual int Restore( CRestore &restore );
static TYPEDESCRIPTION m_SaveData[];
virtual int GetToggleState( void ) { return m_toggle_state; }
virtual float GetDelay( void ) { return m_flWait; }
// common member functions
void LinearMove( Vector vecDest, float flSpeed );
void EXPORT LinearMoveDone( void );
void AngularMove( Vector vecDestAngle, float flSpeed );
void EXPORT AngularMoveDone( void );
BOOL IsLockedByMaster( void );
static float AxisValue( int flags, const Vector &angles );
static void AxisDir( entvars_t *pev );
static float AxisDelta( int flags, const Vector &angle1, const Vector &angle2 );
string_t m_sMaster; // If this button has a master switch, this is the targetname.
// A master switch must be of the multisource type. If all
// of the switches in the multisource have been triggered, then
// the button will be allowed to operate. Otherwise, it will be
// deactivated.
};
__________________