48- (id)initWithDictionary:(NSDictionary*)info
55 position = [
info oo_hpvectorForKey:OOWAYPOINT_KEY_POSITION];
56 Quaternion q = [
info oo_quaternionForKey:OOWAYPOINT_KEY_ORIENTATION];
58 [
self setSize:[
info oo_nonNegativeFloatForKey:OOWAYPOINT_KEY_SIZE defaultValue:1000.0]];
59 [
self setBeaconCode:[
info oo_stringForKey:OOWAYPOINT_KEY_CODE defaultValue:@"W"]];
60 [
self setBeaconLabel:[
info oo_stringForKey:OOWAYPOINT_KEY_LABEL defaultValue:@"Waypoint"]];
119- (void)drawImmediate:(
bool)immediate translucent:(
bool)translucent
125 if (![
PLAYER hasEquipmentItemProviding:
@"EQ_ADVANCED_COMPASS"]) {
132 if ([
PLAYER compassTarget] !=
self) {
145 GLfloat s1 =
_size * 0.75f;
149 OOGL(glEnable(GL_BLEND));
152 OOGL(glColor4f(0.0, 0.0, 1.0, a));
154 for (i = -1; i <= 1; i += 2) {
155 for (j = -1; j <= 1; j += 2) {
156 for (k = -1; k <= 1; k += 2) {
157 glVertex3f(i * s0, j * s0, k * s1);
158 glVertex3f(i * s0, j * s1, k * s0);
159 glVertex3f(i * s0, j * s1, k * s0);
160 glVertex3f(i * s1, j * s0, k * s0);
161 glVertex3f(i * s1, j * s0, k * s0);
162 glVertex3f(i * s0, j * s0, k * s1);
168 glVertex3f(-20.0, 0, -s1 - 20.0f);
169 glVertex3f(0, 0, -s1);
170 glVertex3f(20.0, 0, -s1 - 20.0f);
171 glVertex3f(0, 0, -s1);
172 glVertex3f(-20.0, 0, s1 - 20.0f);
173 glVertex3f(0, 0, s1);
174 glVertex3f(20.0, 0, s1 - 20.0f);
175 glVertex3f(0, 0, s1);
181 OOGL(glDisable(GL_BLEND));