[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[netPanzer-CVS] netpanzer/src/NetPanzer/Classes WorldInputCmdPr...
From: |
Hankin Chick |
Subject: |
[netPanzer-CVS] netpanzer/src/NetPanzer/Classes WorldInputCmdPr... |
Date: |
Sun, 23 Nov 2003 19:09:48 -0500 |
CVSROOT: /cvsroot/netpanzer
Module name: netpanzer
Branch:
Changes by: Hankin Chick <address@hidden> 03/11/23 19:09:48
Modified files:
src/NetPanzer/Classes: WorldInputCmdProcessor.cpp
Log message:
Moved ctrl-rightclick to simple left click to bring up production.
Patches:
Index: netpanzer/src/NetPanzer/Classes/WorldInputCmdProcessor.cpp
diff -u netpanzer/src/NetPanzer/Classes/WorldInputCmdProcessor.cpp:1.30
netpanzer/src/NetPanzer/Classes/WorldInputCmdProcessor.cpp:1.31
--- netpanzer/src/NetPanzer/Classes/WorldInputCmdProcessor.cpp:1.30 Sat Nov
22 10:43:25 2003
+++ netpanzer/src/NetPanzer/Classes/WorldInputCmdProcessor.cpp Sun Nov 23
19:09:48 2003
@@ -354,7 +354,6 @@
continue;
}
working_list.addList( selection_group_lists[ n ] );
-//LOG(("select:%i,working:%i,",n,working_list.unit_list.contains));
}
if(alt_status != true) {
working_list.select();
@@ -713,17 +712,31 @@
iXY temp;
MouseInterface::getMousePosition( &temp.x, &temp.y );
WorldViewInterface::clientXYtoWorldXY( world_win, temp,
&world_pos );
-
- TerminalOutpostOutputLocRequest term_mesg;
- term_mesg.output_loc_request.set( outpost_goal_selection,
- world_pos);
+ Objective *objective;
+ PlayerID player_id = PlayerInterface::getLocalPlayerID();
+ int cs = ObjectiveInterface::quearyObjectiveLocationStatus(
world_pos, player_id, &objective );
+
+ if ( (cs == _player_occupied_objective_found)
+ && outpost_goal_selection == objective->objective_state.ID
+ ) {
+ // we've let go of the mouse on the building so we're
+ // not changing the spawn point
+ selected_objective_id = CURRENT_SELECTED_OUTPOST_ID =
objective->objective_state.ID;
+ activateVehicleSelectionView( selected_objective_id );
+ }
+ else {
+ TerminalOutpostOutputLocRequest term_mesg;
+
+ term_mesg.output_loc_request.set( outpost_goal_selection,
+ world_pos);
- CLIENT->sendMessage( &term_mesg,
sizeof(TerminalOutpostOutputLocRequest), 0 );
+ CLIENT->sendMessage( &term_mesg,
sizeof(TerminalOutpostOutputLocRequest), 0 );
- if ( NetworkState::status == _network_state_client ) {
-
- ObjectiveInterface::sendMessage(
&(term_mesg.output_loc_request) );
+ if ( NetworkState::status == _network_state_client ) {
+
+ ObjectiveInterface::sendMessage(
&(term_mesg.output_loc_request) );
+ }
}
outpost_goal_selection = -1;
}
@@ -734,6 +747,8 @@
WorldViewInterface::clientXYtoWorldXY( world_win, event.down_pos,
&world_pos );
click_status = getCursorStatus( world_pos );
+
+
switch ( click_status ) {
case _cursor_player_unit : {
if( (KeyboardInterface::getKeyState( SDLK_LSHIFT ) ==
true) ||
@@ -808,25 +823,8 @@
return;
}
- if (event.event == MouseEvent::EVENT_CLICK ) {
-
- if ( (KeyboardInterface::getKeyState(SDLK_LCTRL) ||
- KeyboardInterface::getKeyState(SDLK_RCTRL) ) ) {
- WorldViewInterface::clientXYtoWorldXY( world_win, event.down_pos,
&world_pos );
- player_id = PlayerInterface::getLocalPlayerID();
- click_status = ObjectiveInterface::quearyObjectiveLocationStatus(
world_pos, player_id, &objective );
-
- if ( (click_status == _player_occupied_objective_found) ) {
- selected_objective_id = CURRENT_SELECTED_OUTPOST_ID =
objective->objective_state.ID;
- activateVehicleSelectionView( selected_objective_id );
- } else
- if ( (click_status == _enemy_occupied_objective_found) ||
- (click_status == _unoccupied_objective_found)
- ) {
- }
- }
-// else { working_list.unGroup(); }
- } // ** _event_mbutton_click
+// if (event.event == MouseEvent::EVENT_CLICK ) {
+// } // ** _event_mbutton_click
if (event.event == MouseEvent::EVENT_DBCLICK ) {