[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Stratagus-CVS] stratagus/src action/command.c include/actions....
From: |
address@hidden |
Subject: |
[Stratagus-CVS] stratagus/src action/command.c include/actions.... |
Date: |
23 Jan 2004 16:14:49 +1100 |
CVSROOT: /home/strat
Module name: stratagus
Changes by: <address@hidden> 04/01/23 16:14:48
Modified files:
src/action : command.c
src/include : actions.h
src/network : commands.c
Log message:
Fixed autocast
Patches:
Index: stratagus/src/action/command.c
diff -u stratagus/src/action/command.c:1.129
stratagus/src/action/command.c:1.130
--- stratagus/src/action/command.c:1.129 Fri Jan 23 05:12:21 2004
+++ stratagus/src/action/command.c Fri Jan 23 16:14:46 2004
@@ -26,7 +26,7 @@
// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
// 02111-1307, USA.
//
-// $Id: command.c,v 1.129 2004/01/22 18:12:21 nobody_ Exp $
+// $Id: command.c,v 1.130 2004/01/23 05:14:46 jsalmon3 Exp $
//@{
@@ -1228,8 +1228,9 @@
**
** @param unit pointer to unit.
** @param spell Spell type pointer.
+** @param on 1 for auto cast on, 0 for off.
*/
-global void CommandAutoSpellCast(Unit* unit, int spellid)
+global void CommandAutoSpellCast(Unit* unit, int spellid, int on)
{
DebugLevel3Fn(": %d auto-spell-casts %s\n" _C_
UnitNumber(unit) _C_ spell->Ident);
@@ -1238,7 +1239,7 @@
// Check if unit is still valid? (NETWORK!)
//
if (!unit->Removed && unit->Orders[0].Action != UnitActionDie) {
- unit->AutoCastSpell[spellid] ^= 1;
+ unit->AutoCastSpell[spellid] = on;
}
}
Index: stratagus/src/include/actions.h
diff -u stratagus/src/include/actions.h:1.64
stratagus/src/include/actions.h:1.65
--- stratagus/src/include/actions.h:1.64 Fri Jan 23 05:12:23 2004
+++ stratagus/src/include/actions.h Fri Jan 23 16:14:47 2004
@@ -26,7 +26,7 @@
// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
// 02111-1307, USA.
//
-// $Id: actions.h,v 1.64 2004/01/22 18:12:23 nobody_ Exp $
+// $Id: actions.h,v 1.65 2004/01/23 05:14:47 jsalmon3 Exp $
#ifndef __ACTIONS_H__
#define __ACTIONS_H__
@@ -124,7 +124,7 @@
extern void CommandSpellCast(Unit* unit,int x,int y,Unit* dest
,SpellType* spell,int flush);
/// Prepare command auto spellcast
-extern void CommandAutoSpellCast(Unit* unit, int spellid);
+extern void CommandAutoSpellCast(Unit* unit, int spellid, int on);
/// Prepare diplomacy command
extern void CommandDiplomacy(int player,int state,int opponent);
/// Prepare shared vision command
Index: stratagus/src/network/commands.c
diff -u stratagus/src/network/commands.c:1.94
stratagus/src/network/commands.c:1.95
--- stratagus/src/network/commands.c:1.94 Fri Jan 23 16:13:30 2004
+++ stratagus/src/network/commands.c Fri Jan 23 16:14:48 2004
@@ -5,12 +5,12 @@
// /_______ /|__| |__| (____ /__| (____ /\___ /|____//____ >
// \/ \/ \//_____/ \/
// ______________________ ______________________
-// T H E W A R B E G I N S
-// Stratagus - A free fantasy real time strategy game engine
+// T H E W A R B E G I N S
+// Stratagus - A free fantasy real time strategy game engine
//
/address@hidden commands.c - Global command handler - network
support. */
//
-// (c) Copyright 2000-2003 by Lutz Sammer, Andreas Arens, and Jimmy Salmon.
+// (c) Copyright 2000-2004 by Lutz Sammer, Andreas Arens, and Jimmy
Salmon.
//
// This program is free software; you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
@@ -26,7 +26,7 @@
// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
// 02111-1307, USA.
//
-// $Id: commands.c,v 1.94 2004/01/23 05:13:30 wizzard Exp $
+// $Id: commands.c,v 1.95 2004/01/23 05:14:48 jsalmon3 Exp $
//@{
@@ -173,7 +173,7 @@
replay->Comment1 = strdup("Generated by Stratagus Version " VERSION "");
replay->Comment2 = strdup("Visit http://Stratagus.Org for more
information");
- replay->Comment3 = strdup("$Id: commands.c,v 1.94 2004/01/23 05:13:30
wizzard Exp $");
+ replay->Comment3 = strdup("$Id: commands.c,v 1.95 2004/01/23 05:14:48
jsalmon3 Exp $");
if (GameSettings.NetGameType == SettingsSinglePlayerGame) {
replay->Type = ReplaySinglePlayer;
@@ -1386,7 +1386,7 @@
if (NetworkFildes == (Socket)-1) {
CommandLog("auto-spell-cast", unit, FlushCommands, on, -1,
NoUnitP,
NULL, spellid);
- CommandAutoSpellCast(unit, spellid);
+ CommandAutoSpellCast(unit, spellid, on);
} else {
NetworkSendCommand(MessageCommandSpellCast + spellid,
unit, on, -1, NoUnitP, NULL, FlushCommands);
@@ -1658,7 +1658,7 @@
CommandSpellCast(unit, x, y, dest,
SpellTypeTable[id], status);
} else {
CommandLog("auto-spell-cast", unit, status, x,
-1, NoUnitP, NULL, id);
- CommandAutoSpellCast(unit, x);
+ CommandAutoSpellCast(unit, id, x);
}
break;
}
- [Stratagus-CVS] stratagus/src action/command.c include/actions....,
address@hidden <=