Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- helmetMountedDisplay = 1;
- helmetPosition[] = { -0.04, 0.03, 0.1 };
- helmetRight[] = { 0.08, 0, 0 };
- helmetDown[] = { -0, -0.06, 0 };
- #define PosY0CenterAdjust 0.50 //from top
- #define PosYCenterHorizont 0.50 //0.33 for center (old helmet position 0.017 Y)
- #define PosY0Center 0.50
- #define PosX0Center 0.50
- #define SizeX10deg 0.2113243709752
- #define SizeY10deg 0.2931048289372
- #define XtoYscale (SizeX10deg/SizeY10deg)
- #define XY_Scaled(xx,yy) __EVAL(xx),__EVAL((yy)/(XtoYscale))
- class Bones
- {
- class ForwardVec
- {
- type = "vector";
- source = "forward";
- pos0[] = { 0, 0 };
- pos10[] = { SizeX10deg, SizeY10deg };
- };
- class ForwardVecX
- {
- type = "vector";
- source = "forward";
- pos0[] = { 0, 0 };
- pos10[] = { SizeX10deg, 0 };
- };
- class ForwardVecY
- {
- type = "vector";
- source = "forward";
- pos0[] = { 0, 0 };
- pos10[] = { 0, SizeY10deg };
- };
- class Level0 // horizon line bone (hud space)
- {
- type=vector;
- pos0[]={PosX0Center,PosYCenterHorizont};
- pos10[]={__EVAL(PosX0Center+SizeX10deg),__EVAL(PosYCenterHorizont+SizeY10deg)};
- type=horizon;
- angle=0;
- };
- class Draw
- {
- alpha=0.4;
- color[]={0.15,1.0,0.15};
- condition="on";
- //color[]={0.5,0.05,0.05};
- class Border_debug //unnecessary but helps to see the HUD area better
- {
- type = line;
- width = 1.0;
- points[] = {
- { { 0, 0 }, 1 },
- { { 0, 1 }, 1 },
- { { 1, 1 }, 1 },
- { { 1, 0 }, 1 },
- { { 0, 0 }, 1 }
- };
- };
- // FV, FVX and FVY are basically just lines drawn from the Forward Vector and its components X, Y to the 0,0 HUD position. just debug stuff
- class FV { //Forward Vector debug, draws vector between HUD 0,0 and FV 0,0
- class FV_text // label the vector so we know which one is which in game
- {
- type = text;
- source = static;
- text = "FV";
- align = right;
- scale = 1; // text size (obsolete apparently)
- sourceScale = 1;
- pos[] = { ForwardVec, { XY_Scaled(0, 0) }, 1 };
- right[] = { ForwardVec, { XY_Scaled(0.04, 0) }, 1 };
- down[] = { ForwardVec, { XY_Scaled(0, 0.025) }, 1 };
- };
- class FV_cross // draw a cross on the vector (just to display bone orientation better, intended this for later testing with the horizon source)
- {
- type = line;
- width = 1;
- points[] =
- {
- { { 0, 0 }, 1 },
- { ForwardVec, 1 },
- {},
- { ForwardVec, { 0.01, 0.01 }, 1 }, // X mark
- { ForwardVec, { -0.01, -0.01 }, 1 },
- {},
- { ForwardVec, { 0.01, -0.01 }, 1 },
- { ForwardVec, { -0.01, 0.01 }, 1 }
- };
- };
- };
- class FVX { //same as FV except only for X axis
- class FVX_text
- {
- type = text;
- source = static;
- text = "FVX";
- align = right;
- scale = 1; // text size (obsolete apparently)
- sourceScale = 1;
- pos[] = { ForwardVecX, { XY_Scaled(0, 0) }, 1 };
- right[] = { ForwardVecX, { XY_Scaled(0.04, 0) }, 1 };
- down[] = { ForwardVecX, { XY_Scaled(0, 0.025) }, 1 };
- };
- class FVX_cross
- {
- type = line;
- width = 1;
- points[] =
- {
- { { 0, 0 }, 1 },
- { ForwardVecX, 1 },
- {},
- { ForwardVecX, { 0.01, 0.01 }, 1 }, // X mark
- { ForwardVecX, { -0.01, -0.01 }, 1 },
- {},
- { ForwardVecX, { 0.01, -0.01 }, 1 },
- { ForwardVecX, { -0.01, 0.01 }, 1 }
- };
- };
- };
- class FVY { //samesame
- class FVY_text
- {
- type = text;
- source = static;
- text = "FVY";
- align = right;
- scale = 1; // text size (obsolete apparently)
- sourceScale = 1;
- pos[] = { ForwardVecY, { XY_Scaled(0, 0) }, 1 };
- right[] = { ForwardVecY, { XY_Scaled(0.04, 0) }, 1 };
- down[] = { ForwardVecY, { XY_Scaled(0, 0.025) }, 1 };
- };
- class FVY_cross
- {
- type = line;
- width = 1;
- points[] =
- {
- { { 0, 0 }, 1 },
- { ForwardVecY, 1 },
- {},
- { ForwardVecY, { 0.01, 0.01 }, 1 }, // X mark
- { ForwardVecY, { -0.01, -0.01 }, 1 },
- {},
- { ForwardVecY, { 0.01, -0.01 }, 1 },
- { ForwardVecY, { -0.01, 0.01 }, 1 },
- };
- };
- };
- class Horizon {
- //here's where the magic happens. Horizon line which is
- //supposed to indicate the horizon whichever way you look,
- //but due to this bug, the more you look to the side,
- //the more the horizon displays wrong when you look up/down
- class Level0
- {
- type = line;
- width = 2;
- points[] =
- {
- { Level0, { 10, 0 }, 1, ForwardVec, 1 },
- { Level0, { 0.08, 0 }, 1, ForwardVec, 1 },
- {},
- { level0, { -0.08, 0 }, 1, ForwardVec, 1 },
- { level0, { -10, 0 }, 1, ForwardVec, 1 },
- };
- };
- };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement