I made some edits recently in my previous post, so sorry if you've missed them since responding Acca. Didn't see you online!
I don't mind helping out with the door lock stuff if you want.
btw, in response to your original question about why the game north has a disparity with Radiant 'north', I think I have an answer. Quite often, values in the code are set to '0' by default if they haven't been explicitly set by the player via script. But when it comes to the cardinal direction in the game, '0' is equal to '360', so that is why it is always set to the right in relation to Radiant.
In fact, I found the code in the engine here (taken from OpenMOHAA):
Code:
World::World()
{
world = this;
world_dying = qfalse;
// Anything that modifies configstrings, or spawns things is ignored when loading savegames
if( LoadingSavegame )
{
return;
}
assert( entnum == ENTITYNUM_WORLD );
setMoveType( MOVETYPE_NONE );
setSolidType( SOLID_BSP );
// world model is always index 1
edict->s.modelindex = 1;
model = "*1";
UpdateConfigStrings();
// clear out the soundtrack from the last level
ChangeSoundtrack( "" );
// set the default gravity
gi.Cvar_Set( "sv_gravity", "800" );
// set the default farplane parameters
farplane_distance = 0;
farplane_color = "0 0 0";
farplane_cull = qtrue;
UpdateFog();
sky_portal = qtrue;
UpdateSky();
m_fAIVisionDistance = 2048.0f;
level.cinematic = spawnflags & WORLD_CINEMATIC;
if( level.cinematic )
gi.Cvar_Set( "sv_cinematic", "1" );
else
gi.Cvar_Set( "sv_cinematic", "0" );
level.nextmap = "";
level.level_name = level.mapname;
SoundMan.Load();
// Set the color for the blends.
level.water_color = Vector( 0, 0, 1 );
level.water_alpha = 0.1f;
level.lava_color = Vector( 1.0f, 0.3f, 0 );
level.lava_alpha = 0.6f;
//
// set the targetname of the world
//
SetTargetName( "world" );
m_fNorth = 0;
}
m_fNorth is changed by the northyaw command I explained previously, and by default it's 0 in the engine.