mirror of
https://git.code.sf.net/p/quake/game-source
synced 2025-02-17 17:31:37 +00:00
waypoint info now works
This commit is contained in:
parent
efde0e8ab1
commit
cc4429d1fe
3 changed files with 18 additions and 8 deletions
|
@ -373,9 +373,9 @@ very good all things considered.
|
||||||
[current_way linkWay:t];
|
[current_way linkWay:t];
|
||||||
}
|
}
|
||||||
if (editor) {
|
if (editor) {
|
||||||
setmodel(t.ent, "progs/s_light.spr");
|
|
||||||
if (current_way)
|
if (current_way)
|
||||||
setmodel(current_way.ent, "progs/s_bubble.spr");
|
[current_way deselect];
|
||||||
|
[t select];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
current_way = t;
|
current_way = t;
|
||||||
|
|
|
@ -4,6 +4,7 @@
|
||||||
@class ImpulseMenu;
|
@class ImpulseMenu;
|
||||||
@class Waypoint;
|
@class Waypoint;
|
||||||
@class Bot;
|
@class Bot;
|
||||||
|
@class Target;
|
||||||
|
|
||||||
@interface EditorState: Object
|
@interface EditorState: Object
|
||||||
{
|
{
|
||||||
|
@ -13,6 +14,7 @@
|
||||||
string confirm_text;
|
string confirm_text;
|
||||||
string confirm_cmd;
|
string confirm_cmd;
|
||||||
|
|
||||||
|
Target owner;
|
||||||
Waypoint current_way;
|
Waypoint current_way;
|
||||||
Waypoint last_way;
|
Waypoint last_way;
|
||||||
integer hold_select;
|
integer hold_select;
|
||||||
|
@ -62,9 +64,10 @@
|
||||||
+(void)toggleHoldSelectState;
|
+(void)toggleHoldSelectState;
|
||||||
+(string)getConfirmText;
|
+(string)getConfirmText;
|
||||||
+(Waypoint)current_way;
|
+(Waypoint)current_way;
|
||||||
|
-(Waypoint)current_way;
|
||||||
|
|
||||||
+(void)impulse;
|
+(void)impulse;
|
||||||
-(id)init;
|
-(id)initWithOwner:(Target)owner;
|
||||||
@end
|
@end
|
||||||
|
|
||||||
#endif//__editor_h
|
#endif//__editor_h
|
||||||
|
|
|
@ -510,9 +510,12 @@
|
||||||
|
|
||||||
+close_menu
|
+close_menu
|
||||||
{
|
{
|
||||||
|
local Target player = (Target) @self.@this;
|
||||||
[EditorState set_menu: NIL];
|
[EditorState set_menu: NIL];
|
||||||
[Waypoint hideAll];
|
[Waypoint hideAll];
|
||||||
waypoint_mode = WM_LOADED;
|
waypoint_mode = WM_LOADED;
|
||||||
|
[player.editor release];
|
||||||
|
player.editor = NIL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -836,8 +839,12 @@
|
||||||
|
|
||||||
+(Waypoint)current_way
|
+(Waypoint)current_way
|
||||||
{
|
{
|
||||||
local EditorState editor = ((Target) @self.@this).editor;
|
return ((Target) @self.@this).current_way;
|
||||||
return editor.current_way;
|
}
|
||||||
|
|
||||||
|
-(Waypoint)current_way
|
||||||
|
{
|
||||||
|
return owner.current_way;
|
||||||
}
|
}
|
||||||
|
|
||||||
+(void)impulse
|
+(void)impulse
|
||||||
|
@ -846,10 +853,9 @@
|
||||||
local EditorState editor = player.editor;
|
local EditorState editor = player.editor;
|
||||||
|
|
||||||
if (!editor) {
|
if (!editor) {
|
||||||
dprint ("start editor");
|
|
||||||
if (@self.impulse != 104)
|
if (@self.impulse != 104)
|
||||||
return;
|
return;
|
||||||
player.editor = [[EditorState alloc] init];
|
player.editor = [[EditorState alloc] initWithOwner:player];
|
||||||
[EditorState main_menu];
|
[EditorState main_menu];
|
||||||
@self.impulse = 0;
|
@self.impulse = 0;
|
||||||
return;
|
return;
|
||||||
|
@ -861,11 +867,12 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
-(id)init
|
-(id)initWithOwner:(Target)owner
|
||||||
{
|
{
|
||||||
if (!main_menu)
|
if (!main_menu)
|
||||||
init_menus ();
|
init_menus ();
|
||||||
self = [super init];
|
self = [super init];
|
||||||
|
self.owner = owner;
|
||||||
waypoint_mode = WM_EDITOR;
|
waypoint_mode = WM_EDITOR;
|
||||||
[Waypoint showAll];
|
[Waypoint showAll];
|
||||||
return self;
|
return self;
|
||||||
|
|
Loading…
Reference in a new issue