[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Stratagus-CVS] stratagus doc/ChangeLog.html src/clone/unit.c s...
From: |
Russell Smith |
Subject: |
[Stratagus-CVS] stratagus doc/ChangeLog.html src/clone/unit.c s... |
Date: |
Sun, 21 Sep 2003 03:13:52 -0400 |
CVSROOT: /cvsroot/stratagus
Module name: stratagus
Branch:
Changes by: Russell Smith <address@hidden> 03/09/21 03:13:51
Modified files:
doc : ChangeLog.html
src/clone : unit.c
src/missile : missile.c
Log message:
RevealAttacker does what it should, attack the attacker
Patches:
Index: stratagus/doc/ChangeLog.html
diff -u stratagus/doc/ChangeLog.html:1.537 stratagus/doc/ChangeLog.html:1.538
--- stratagus/doc/ChangeLog.html:1.537 Sun Sep 21 00:32:24 2003
+++ stratagus/doc/ChangeLog.html Sun Sep 21 03:13:51 2003
@@ -2,7 +2,7 @@
<html>
<head>
<!--
----- $Id: ChangeLog.html,v 1.537 2003/09/21 04:32:24 mr-russ Exp $
+---- $Id: ChangeLog.html,v 1.538 2003/09/21 07:13:51 mr-russ Exp $
---- (c) Copyright 1998-2003 by Lutz Sammer
@@ -36,6 +36,7 @@
<li>Future 1.19 Release<p>
<ul>
<li>++
+ <li>RevealAttacker does what it should, attack the attacker (from Russell
Smith).
<li>DrawUnitInfo uses Resource Names instead of hard coded (from Russell
Smith).
<li>Use first races UI by default, it should be defined (from Russell
Smith).
<li>Allow victory/defeat backgrounds to not be set (from Russell Smith).
Index: stratagus/src/clone/unit.c
diff -u stratagus/src/clone/unit.c:1.298 stratagus/src/clone/unit.c:1.299
--- stratagus/src/clone/unit.c:1.298 Sat Sep 20 05:03:40 2003
+++ stratagus/src/clone/unit.c Sun Sep 21 03:13:51 2003
@@ -26,7 +26,7 @@
// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
// 02111-1307, USA.
//
-// $Id: unit.c,v 1.298 2003/09/20 09:03:40 mr-russ Exp $
+// $Id: unit.c,v 1.299 2003/09/21 07:13:51 mr-russ Exp $
//@{
@@ -3325,7 +3325,11 @@
//
if( !type->Coward ) {
if( type->CanAttack && target->Stats->Speed ) {
- goal=AttackUnitsInReactRange(target);
+ if( RevealAttacker && CanTarget(target->Type,attacker->Type)) { //
Reveal Unit that is attacking
+ goal=attacker;
+ } else {
+ goal=AttackUnitsInReactRange(target);
+ }
if( goal ) {
if( target->SavedOrder.Action==UnitActionStill ) {
// FIXME: should rewrite command handling
@@ -3971,7 +3975,7 @@
int InRun, RunStart;
CLprintf(file,"\n;;; -----------------------------------------\n");
- CLprintf(file,";;; MODULE: units $Id: unit.c,v 1.298 2003/09/20 09:03:40
mr-russ Exp $\n\n");
+ CLprintf(file,";;; MODULE: units $Id: unit.c,v 1.299 2003/09/21 07:13:51
mr-russ Exp $\n\n");
//
// Local variables
Index: stratagus/src/missile/missile.c
diff -u stratagus/src/missile/missile.c:1.78
stratagus/src/missile/missile.c:1.79
--- stratagus/src/missile/missile.c:1.78 Wed Sep 17 05:17:13 2003
+++ stratagus/src/missile/missile.c Sun Sep 21 03:13:51 2003
@@ -26,7 +26,7 @@
// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
// 02111-1307, USA.
//
-// $Id: missile.c,v 1.78 2003/09/17 09:17:13 mr-russ Exp $
+// $Id: missile.c,v 1.79 2003/09/21 07:13:51 mr-russ Exp $
//@{
@@ -526,21 +526,6 @@
// FIXME: goal is already dead, but missile could hit others?
}
- if( goal && RevealAttacker ) { // attacking units are seen
- Unit* target;
- // FIXME: Don't use UnitTypeByIdent during runtime.
- target = MakeUnit(UnitTypeByIdent("unit-reveal-attacker"),
goal->Player);
- target->Orders[0].Action = UnitActionStill;
- target->HP = 0;
- target->X = unit->X;
- target->Y = unit->Y;
- target->TTL=GameCycle+CYCLES_PER_SECOND+CYCLES_PER_SECOND/2;
- target->CurrentSightRange=target->Stats->SightRange;
- // Little hack for the way the macro works :)
- MapMarkUnitOnBoardSight(goal,unit);
- CheckUnitToBeDrawn(target);
- }
-
//
// None missile hits immediately!
//
@@ -1523,7 +1508,7 @@
int i;
CLprintf(file,"\n;;; -----------------------------------------\n");
- CLprintf(file,";;; MODULE: missile-types $Id: missile.c,v 1.78 2003/09/17
09:17:13 mr-russ Exp $\n\n");
+ CLprintf(file,";;; MODULE: missile-types $Id: missile.c,v 1.79 2003/09/21
07:13:51 mr-russ Exp $\n\n");
//
// Original number to internal missile-type name.
@@ -1618,7 +1603,7 @@
Missile* const* missiles;
CLprintf(file,"\n;;; -----------------------------------------\n");
- CLprintf(file,";;; MODULE: missiles $Id: missile.c,v 1.78 2003/09/17
09:17:13 mr-russ Exp $\n\n");
+ CLprintf(file,";;; MODULE: missiles $Id: missile.c,v 1.79 2003/09/21
07:13:51 mr-russ Exp $\n\n");
for( missiles=GlobalMissiles; *missiles; ++missiles ) {
SaveMissile(*missiles,file);
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Stratagus-CVS] stratagus doc/ChangeLog.html src/clone/unit.c s...,
Russell Smith <=