forked from Mirrors/openclonk
Engine: Removed FIGHT procedure and all related stuff.
This is obsolete with new melee implementation and other authors should either use that or make something unique themselfs. Removed DFA_FIGHT, C4Script FnFightWith, ObjectActionFight, NoFight, OCF_FightReady, Fight Physicalstable-5.1
parent
596bde6c4c
commit
59a09c3c3c
|
@ -104,7 +104,6 @@ msgstr "Kategorie"
|
|||
#: sdk/script/fn/OCF_HitSpeed1.xml:9(subcat)
|
||||
#: sdk/script/fn/OCF_Grab.xml:9(subcat)
|
||||
#: sdk/script/fn/OCF_Fullcon.xml:9(subcat)
|
||||
#: sdk/script/fn/OCF_FightReady.xml:9(subcat)
|
||||
#: sdk/script/fn/OCF_Exclusive.xml:9(subcat)
|
||||
#: sdk/script/fn/OCF_Entrance.xml:9(subcat)
|
||||
#: sdk/script/fn/OCF_Edible.xml:9(subcat)
|
||||
|
@ -1463,7 +1462,6 @@ msgstr "Entfernt alle Objekte."
|
|||
#: sdk/script/fn/OCF_HitSpeed1.xml:8(category)
|
||||
#: sdk/script/fn/OCF_Grab.xml:8(category)
|
||||
#: sdk/script/fn/OCF_Fullcon.xml:8(category)
|
||||
#: sdk/script/fn/OCF_FightReady.xml:8(category)
|
||||
#: sdk/script/fn/OCF_Exclusive.xml:8(category)
|
||||
#: sdk/script/fn/OCF_Entrance.xml:8(category)
|
||||
#: sdk/script/fn/OCF_Edible.xml:8(category)
|
||||
|
@ -1562,7 +1560,6 @@ msgstr "Entfernt alle Objekte."
|
|||
#: sdk/script/fn/FindObject.xml:8(category)
|
||||
#: sdk/script/fn/FindContents.xml:8(category)
|
||||
#: sdk/script/fn/FindBase.xml:8(category)
|
||||
#: sdk/script/fn/FightWith.xml:8(category)
|
||||
#: sdk/script/fn/Extinguish.xml:8(category)
|
||||
#: sdk/script/fn/Explode.xml:8(category)
|
||||
#: sdk/script/fn/Exit.xml:8(category)
|
||||
|
@ -1842,7 +1839,6 @@ msgstr "Konstante für <placeholder-1/>/<placeholder-2/>. Das Objekt ist für de
|
|||
#: sdk/script/fn/OCF_HitSpeed1.xml:13(remark)
|
||||
#: sdk/script/fn/OCF_Grab.xml:13(remark)
|
||||
#: sdk/script/fn/OCF_Fullcon.xml:13(remark)
|
||||
#: sdk/script/fn/OCF_FightReady.xml:13(remark)
|
||||
#: sdk/script/fn/OCF_Exclusive.xml:13(remark)
|
||||
#: sdk/script/fn/OCF_Entrance.xml:13(remark)
|
||||
#: sdk/script/fn/OCF_Edible.xml:13(remark)
|
||||
|
@ -2120,7 +2116,6 @@ msgstr "Setzt die MeshTransformation für das aufrufende Objekt zurück."
|
|||
#: sdk/script/fn/GetDamage.xml:9(subcat)
|
||||
#: sdk/script/fn/GetContact.xml:9(subcat)
|
||||
#: sdk/script/fn/GetCon.xml:9(subcat)
|
||||
#: sdk/script/fn/FightWith.xml:9(subcat)
|
||||
#: sdk/script/fn/Extinguish.xml:9(subcat)
|
||||
#: sdk/script/fn/EnergyCheck.xml:9(subcat)
|
||||
#: sdk/script/fn/DoMagicEnergy.xml:9(subcat)
|
||||
|
@ -6135,7 +6130,6 @@ msgstr "Object character flag: Objekt ist drehbar."
|
|||
#: sdk/script/fn/OCF_HitSpeed1.xml:14(remark)
|
||||
#: sdk/script/fn/OCF_Grab.xml:14(remark)
|
||||
#: sdk/script/fn/OCF_Fullcon.xml:14(remark)
|
||||
#: sdk/script/fn/OCF_FightReady.xml:14(remark)
|
||||
#: sdk/script/fn/OCF_Exclusive.xml:14(remark)
|
||||
#: sdk/script/fn/OCF_Entrance.xml:14(remark)
|
||||
#: sdk/script/fn/OCF_Edible.xml:14(remark)
|
||||
|
@ -6168,7 +6162,6 @@ msgstr "Für weitere Informationen und Beispiele zur Benutzung dieser Konstanten
|
|||
#: sdk/script/fn/OCF_HitSpeed1.xml:18(emlink)
|
||||
#: sdk/script/fn/OCF_Grab.xml:18(emlink)
|
||||
#: sdk/script/fn/OCF_Fullcon.xml:18(emlink)
|
||||
#: sdk/script/fn/OCF_FightReady.xml:18(emlink)
|
||||
#: sdk/script/fn/OCF_Exclusive.xml:18(emlink)
|
||||
#: sdk/script/fn/OCF_Entrance.xml:18(emlink)
|
||||
#: sdk/script/fn/OCF_Edible.xml:18(emlink)
|
||||
|
|
|
@ -385,11 +385,6 @@
|
|||
<col>Integer</col>
|
||||
<col>0 or 1. If 1 the object can not be taken from containers by a clonk.</col>
|
||||
</row>
|
||||
<row>
|
||||
<literal_col>NoFight</literal_col>
|
||||
<col>Integer</col>
|
||||
<col>0 or 1. If 1 the object will never enter into a fight with other living beings.</col>
|
||||
</row>
|
||||
<row>
|
||||
<literal_col>LiftTop</literal_col>
|
||||
<col>Integer</col>
|
||||
|
@ -475,11 +470,6 @@
|
|||
<col>Integer</col>
|
||||
<col>0-100000. Push power.</col>
|
||||
</row>
|
||||
<row>
|
||||
<literal_col>Fight</literal_col>
|
||||
<col>Integer</col>
|
||||
<col>0-100000. Fight power.</col>
|
||||
</row>
|
||||
<row>
|
||||
<literal_col>Magic</literal_col>
|
||||
<col>Integer</col>
|
||||
|
|
|
@ -14,6 +14,6 @@ while (obj = <funclink>FindObject</funclink>(0, -100,-100,200,200, <funclink>OCF
|
|||
<funclink>SetR</funclink>(180, obj);</code> <text>This script turns all rotatable objects upside down.</text>
|
||||
<h id="ocf_fns">OCF Constants</h>
|
||||
<text>The following OCFs are defined in C4Script:</text>
|
||||
<text><funclink>OCF_Alive</funclink>, <funclink>OCF_AttractLightning</funclink>, <funclink>OCF_Available</funclink>, <funclink>OCF_Chop</funclink>, <funclink>OCF_Collectible</funclink>, <funclink>OCF_Collection</funclink>, <funclink>OCF_Construct</funclink>, <funclink>OCF_Container</funclink>, <funclink>OCF_CrewMember</funclink>, <funclink>OCF_Edible</funclink>, <funclink>OCF_Entrance</funclink>, <funclink>OCF_Exclusive</funclink>, <funclink>OCF_FightReady</funclink>, <funclink>OCF_Fullcon</funclink>, <funclink>OCF_Grab</funclink>, <funclink>OCF_HitSpeed1</funclink>, <funclink>OCF_HitSpeed2</funclink>, <funclink>OCF_HitSpeed3</funclink>, <funclink>OCF_HitSpeed4</funclink>, <funclink>OCF_Inflammable</funclink>, <funclink>OCF_InFree</funclink>, <funclink>OCF_InLiquid</funclink>, <funclink>OCF_InSolid</funclink>, <funclink>OCF_LineConstruct</funclink>, <funclink>OCF_Living</funclink>, <funclink>OCF_NotContained</funclink>, <funclink>OCF_OnFire</funclink>, <funclink>OCF_PowerConsumer</funclink>, <funclink>OCF_PowerSupply</funclink>, <funclink>OCF_Prey</funclink>, <funclink>OCF_Rotate</funclink></text>
|
||||
<text><funclink>OCF_Alive</funclink>, <funclink>OCF_AttractLightning</funclink>, <funclink>OCF_Available</funclink>, <funclink>OCF_Chop</funclink>, <funclink>OCF_Collectible</funclink>, <funclink>OCF_Collection</funclink>, <funclink>OCF_Construct</funclink>, <funclink>OCF_Container</funclink>, <funclink>OCF_CrewMember</funclink>, <funclink>OCF_Edible</funclink>, <funclink>OCF_Entrance</funclink>, <funclink>OCF_Exclusive</funclink>, <funclink>OCF_Fullcon</funclink>, <funclink>OCF_Grab</funclink>, <funclink>OCF_HitSpeed1</funclink>, <funclink>OCF_HitSpeed2</funclink>, <funclink>OCF_HitSpeed3</funclink>, <funclink>OCF_HitSpeed4</funclink>, <funclink>OCF_Inflammable</funclink>, <funclink>OCF_InFree</funclink>, <funclink>OCF_InLiquid</funclink>, <funclink>OCF_InSolid</funclink>, <funclink>OCF_LineConstruct</funclink>, <funclink>OCF_Living</funclink>, <funclink>OCF_NotContained</funclink>, <funclink>OCF_OnFire</funclink>, <funclink>OCF_PowerConsumer</funclink>, <funclink>OCF_PowerSupply</funclink>, <funclink>OCF_Prey</funclink>, <funclink>OCF_Rotate</funclink></text>
|
||||
<author>Sven2</author><date>2002-05</date>
|
||||
</doc>
|
||||
|
|
|
@ -110,12 +110,6 @@
|
|||
<col>Adjusts object position at vertex a to the position of vertex b of the <emlink href="script/fn/SetAction.html">target object</emlink>. a and b are the two low bytes of <emlink href="script/fn/SetActionData.html">ActionData</emlink> (see <emlink href="script/fn/SetActionData.html">SetActionData</emlink> for an example).</col>
|
||||
<col>CNAT_None</col>
|
||||
</row>
|
||||
<row>
|
||||
<col>FIGHT</col>
|
||||
<col>Fighting</col>
|
||||
<col>Fight against <emlink href="script/fn/SetAction.html">target object</emlink> according to <emlink href="definition/defcore.html#SektionPhysical">Fight physical</emlink>.</col>
|
||||
<col>CNAT_Bottom</col>
|
||||
</row>
|
||||
<row>
|
||||
<col>CONNECT</col>
|
||||
<col>Line connections</col>
|
||||
|
|
|
@ -1,34 +0,0 @@
|
|||
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
|
||||
<!DOCTYPE funcs
|
||||
SYSTEM '../../../clonk.dtd'>
|
||||
<?xml-stylesheet type="text/xsl" href="../../../clonk.xsl"?>
|
||||
<funcs>
|
||||
<func>
|
||||
<title>FightWith</title>
|
||||
<category>Objects</category>
|
||||
<subcat>Status</subcat>
|
||||
<version>4.9.1.0 GWE</version>
|
||||
<syntax>
|
||||
<rtype>bool</rtype>
|
||||
<params>
|
||||
<param>
|
||||
<type>object</type>
|
||||
<name>target</name>
|
||||
<desc>Object to be fought.</desc>
|
||||
</param>
|
||||
</params>
|
||||
</syntax>
|
||||
<desc>Starts a clonk-to-clonk fight. Using this command you can also make allied clonks fight. Both participants must be <funclink>OCF_FightReady</funclink>.</desc>
|
||||
<examples>
|
||||
<example>
|
||||
<code>FightWith(<funclink>FindObject</funclink>(0, -8,-10,16,20 <funclink>OCF_FightReady</funclink>()));</code>
|
||||
<text>Fights another object close-by.</text>
|
||||
</example>
|
||||
</examples>
|
||||
<related>
|
||||
<funclink>Punch</funclink>
|
||||
<funclink>OCF_FightReady</funclink>
|
||||
</related>
|
||||
</func>
|
||||
<author>Sven2</author><date>2002-05</date>
|
||||
</funcs>
|
|
@ -1,22 +0,0 @@
|
|||
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
|
||||
<!DOCTYPE funcs
|
||||
SYSTEM '../../../clonk.dtd'>
|
||||
<?xml-stylesheet type="text/xsl" href="../../../clonk.xsl"?>
|
||||
<funcs>
|
||||
<func>
|
||||
<title>OCF_FightReady</title>
|
||||
<category>Objects</category>
|
||||
<subcat>OCF</subcat>
|
||||
<version>4.9.1.0 GWE</version>
|
||||
<syntax><rtype>int</rtype></syntax>
|
||||
<desc>Object character flag: object is a living being, has an activity, and no ObjectDisabled flag in that activity.</desc>
|
||||
<remark>This value is also defined as a constant. Thus the parameter brackets can be omitted.</remark>
|
||||
<remark>For more information and examples regarding these constants see <emlink href="definition/ocf.html">object character flags</emlink>.</remark>
|
||||
<related>
|
||||
<funclink>GetOCF</funclink>
|
||||
<funclink>FindObject</funclink>
|
||||
<emlink href="definition/ocf.html">Object character flags</emlink>
|
||||
</related>
|
||||
</func>
|
||||
<author>Sven2</author><date>2002-05</date>
|
||||
</funcs>
|
|
@ -29,7 +29,6 @@ IncompleteActivity=1
|
|||
VehicleControl=2
|
||||
Pathfinder=1
|
||||
ClosedContainer=2
|
||||
NoFight=1
|
||||
|
||||
[Physical]
|
||||
Energy=50000
|
||||
|
@ -42,5 +41,4 @@ Dig=40000
|
|||
Swim=60000
|
||||
Throw=50000
|
||||
Push=40000
|
||||
Fight=50000
|
||||
CanDig=1
|
||||
|
|
|
@ -25,7 +25,6 @@ StretchGrowth=1
|
|||
NoBurnDecay=1
|
||||
IncompleteActivity=1
|
||||
Oversize=1
|
||||
NoFight=1
|
||||
|
||||
[Physical]
|
||||
Energy=50000
|
||||
|
@ -38,7 +37,6 @@ Dig=40000
|
|||
Swim=60000
|
||||
Throw=50000
|
||||
Push=40000
|
||||
Fight=50000
|
||||
CanDig=1
|
||||
CanConstruct=1
|
||||
CanChop=1
|
||||
|
|
|
@ -115,7 +115,6 @@ protected func FxIntRedefineStart(object trg, int num, int tmp, id idTo)
|
|||
RedefinePhysical("Swim", idTo);
|
||||
RedefinePhysical("Throw", idTo);
|
||||
RedefinePhysical("Push", idTo);
|
||||
RedefinePhysical("Fight", idTo);
|
||||
RedefinePhysical("Magic", idTo);
|
||||
RedefinePhysical("Float", idTo);
|
||||
/*if (GetRank()<4) RedefinePhysical("CanScale", idTo);
|
||||
|
@ -146,7 +145,6 @@ protected func FxIntRedefineStop(object trg, int num, int iReason, bool tmp)
|
|||
ResetPhysical("CanDig");
|
||||
ResetPhysical("Float");
|
||||
ResetPhysical("Magic");
|
||||
ResetPhysical("Fight");
|
||||
ResetPhysical("Push");
|
||||
ResetPhysical("Throw");
|
||||
ResetPhysical("Swim");
|
||||
|
|
|
@ -23,9 +23,8 @@ static const DFA_CHOP = 11;
|
|||
static const DFA_LIFT = 12;
|
||||
static const DFA_FLOAT = 13;
|
||||
static const DFA_ATTACH = 14;
|
||||
static const DFA_FIGHT = 15;
|
||||
static const DFA_CONNECT = 16;
|
||||
static const DFA_PULL = 17;
|
||||
static const DFA_CONNECT = 15;
|
||||
static const DFA_PULL = 16;
|
||||
static const Action = {
|
||||
Length = 1,
|
||||
Directions = 1,
|
||||
|
|
|
@ -66,7 +66,6 @@ global func GetDefSmokeRate() { return GetDefCoreVal("SmokeRate", "DefCore");
|
|||
global func GetDefNoBreath() { return GetDefCoreVal("NoBreath", "DefCore"); }
|
||||
global func GetDefConSizeOff() { return GetDefCoreVal("ConSizeOff", "DefCore"); }
|
||||
global func GetDefNoSell() { return GetDefCoreVal("NoSell", "DefCore"); }
|
||||
global func GetDefNoFight() { return GetDefCoreVal("NoFight", "DefCore"); }
|
||||
|
||||
// GetObjectVal
|
||||
global func GetObjOwnMass() { return GetObjectVal("OwnMass", 0); }
|
||||
|
|
|
@ -376,7 +376,6 @@ IDS_DESC_ENERGY=Energie:
|
|||
IDS_DESC_ENGINE=Dieses Zusatzprogramm ist für die Ausführung von Spielrunden verantwortlich.\n\nBei Auswahl eines Szenarios zeigt die rote Markierung an, welche Engine für die Ausführung des jeweiligen Szenarios verwendet wird.\n\nDurch Aktivierung oder Deaktivierung einer Engine (Kästchen wird grün) kann bestimmt werden, welche Engine eingesetzt werden soll, falls mehrere gleichermaßen geeignete Engines vorhanden sind.
|
||||
IDS_DESC_EXPECTING=Teilnehmer werden erwartet.
|
||||
IDS_DESC_FAIRCREWSTRENGTH=Bestimmt die Stärke der Clonks in einem Spiel mit "Fairen Clonks".
|
||||
IDS_DESC_FIGHT=Kämpfen:
|
||||
IDS_DESC_FONTSIZE=Schriftgröße auswählen. Bei Wechsel der Bildschirmauflösung wird die Schriftgröße automatisch angepasst.
|
||||
IDS_DESC_GAMEMUSIC=Steuert Hintergrundmusik im Spiel.
|
||||
IDS_DESC_GAMEPADFORMENU=Mit dieser Option kann das Gamepad für die Steuerung des Menüsystems verwendet werden.
|
||||
|
|
|
@ -376,7 +376,6 @@ IDS_DESC_ENERGY=Energy:
|
|||
IDS_DESC_ENGINE=Engine modules are used to run the game.\n\nWhen selecting a scenario, the red check mark will indicate which engine is going to be used to run that scenario.\n\nBy activating or deactivating an engine (check box will turn green) you can determine which engine will be used if there are multiple, equally well suited engines present.
|
||||
IDS_DESC_EXPECTING=Awaiting participants.
|
||||
IDS_DESC_FAIRCREWSTRENGTH=Controls the strength of Clonks in a game with "Fair Crew".
|
||||
IDS_DESC_FIGHT=Fight:
|
||||
IDS_DESC_FONTSIZE=Select font size. When you change the screen resolution, the font size will be automatically adjusted.
|
||||
IDS_DESC_GAMEMUSIC=Enable background music in the game.
|
||||
IDS_DESC_GAMEPADFORMENU=If enabled, you can control the startup menu system with your gamepad.
|
||||
|
|
|
@ -25,7 +25,6 @@ StretchGrowth=1
|
|||
NoBurnDecay=1
|
||||
IncompleteActivity=1
|
||||
Oversize=1
|
||||
NoFight=1
|
||||
|
||||
[Physical]
|
||||
Energy=50000
|
||||
|
@ -38,7 +37,6 @@ Dig=20000
|
|||
Swim=30000
|
||||
Throw=25000
|
||||
Push=20000
|
||||
Fight=25000
|
||||
CanDig=1
|
||||
CanConstruct=1
|
||||
CanChop=1
|
||||
|
|
|
@ -25,18 +25,18 @@
|
|||
|
||||
//============================= Main =====================================================
|
||||
|
||||
const size_t C4MaxTitle = 512;
|
||||
const size_t C4MaxTitle = 512;
|
||||
const int
|
||||
C4MaxDefString = 100,
|
||||
C4MaxMessage = 256,
|
||||
C4RetireDelay = 60,
|
||||
C4MaxColor = 12,
|
||||
C4MaxKey = 12,
|
||||
C4MaxKeyboardSet = 4,
|
||||
C4MaxControlSet = C4MaxKeyboardSet+4, // keyboard sets+gamepads
|
||||
C4MaxControlRate = 20,
|
||||
C4MaxGammaUserRamps = 8,
|
||||
C4MaxGammaRamps = C4MaxGammaUserRamps+1;
|
||||
C4MaxDefString = 100,
|
||||
C4MaxMessage = 256,
|
||||
C4RetireDelay = 60,
|
||||
C4MaxColor = 12,
|
||||
C4MaxKey = 12,
|
||||
C4MaxKeyboardSet = 4,
|
||||
C4MaxControlSet = C4MaxKeyboardSet+4, // keyboard sets+gamepads
|
||||
C4MaxControlRate = 20,
|
||||
C4MaxGammaUserRamps = 8,
|
||||
C4MaxGammaRamps = C4MaxGammaUserRamps+1;
|
||||
|
||||
// gamma ramp indices
|
||||
#define C4GRI_SCENARIO 0
|
||||
|
@ -47,94 +47,97 @@ C4MaxGammaRamps = C4MaxGammaUserRamps+1;
|
|||
#define C4GRI_LIGHTNING 5
|
||||
#define C4GRI_MAGIC 6
|
||||
#define C4GRI_RESERVED3 7
|
||||
|
||||
#define C4GRI_USER 8
|
||||
|
||||
const int C4M_MaxName = 15,
|
||||
C4M_MaxDefName = 2*C4M_MaxName+1,
|
||||
C4M_MaxTexIndex = 127; // last texture map index is reserved for diff
|
||||
const int
|
||||
C4M_MaxName = 15,
|
||||
C4M_MaxDefName = 2*C4M_MaxName+1,
|
||||
C4M_MaxTexIndex = 127; // last texture map index is reserved for diff
|
||||
|
||||
const int C4S_MaxPlayer = 4;
|
||||
const int C4S_MaxPlayer = 4;
|
||||
|
||||
const int C4D_MaxVertex = 30;
|
||||
const int C4D_MaxVertex = 30;
|
||||
|
||||
const int C4SymbolSize = 35,
|
||||
C4SymbolBorder = 5,
|
||||
C4UpperBoardHeight = 50,
|
||||
C4PictureSize = 64,
|
||||
C4MaxPictureSize = 150,
|
||||
C4MaxBigIconSize = 64;
|
||||
const int
|
||||
C4SymbolSize = 35,
|
||||
C4SymbolBorder = 5,
|
||||
C4UpperBoardHeight = 50,
|
||||
C4PictureSize = 64,
|
||||
C4MaxPictureSize = 150,
|
||||
C4MaxBigIconSize = 64;
|
||||
|
||||
const int C4P_MaxPosition = 4;
|
||||
|
||||
const int C4P_Control_None = -1,
|
||||
C4P_Control_Keyboard1 = 0,
|
||||
C4P_Control_Keyboard2 = 1,
|
||||
C4P_Control_Keyboard3 = 2,
|
||||
C4P_Control_Keyboard4 = 3,
|
||||
C4P_Control_GamePad1 = 4,
|
||||
C4P_Control_GamePad2 = 5,
|
||||
C4P_Control_GamePad3 = 6,
|
||||
C4P_Control_GamePad4 = 7,
|
||||
C4P_Control_GamePadMax = C4P_Control_GamePad4;
|
||||
const int
|
||||
C4P_Control_None = -1,
|
||||
C4P_Control_Keyboard1 = 0,
|
||||
C4P_Control_Keyboard2 = 1,
|
||||
C4P_Control_Keyboard3 = 2,
|
||||
C4P_Control_Keyboard4 = 3,
|
||||
C4P_Control_GamePad1 = 4,
|
||||
C4P_Control_GamePad2 = 5,
|
||||
C4P_Control_GamePad3 = 6,
|
||||
C4P_Control_GamePad4 = 7,
|
||||
C4P_Control_GamePadMax = C4P_Control_GamePad4;
|
||||
|
||||
const int C4ViewportScrollBorder = 40; // scrolling past landscape allowed at range of this border
|
||||
|
||||
//============================= Engine Return Values ======================================
|
||||
|
||||
const int C4XRV_Completed = 0,
|
||||
C4XRV_Failure = 1,
|
||||
C4XRV_Aborted = 2;
|
||||
const int
|
||||
C4XRV_Completed = 0,
|
||||
C4XRV_Failure = 1,
|
||||
C4XRV_Aborted = 2;
|
||||
|
||||
//============================= Object Character Flags ====================================
|
||||
|
||||
const uint32_t OCF_None=0,
|
||||
OCF_All=~OCF_None,
|
||||
OCF_Normal=1,
|
||||
OCF_Construct=1<<1,
|
||||
OCF_Grab=1<<2,
|
||||
OCF_Carryable=1<<3,
|
||||
OCF_OnFire=1<<4,
|
||||
OCF_HitSpeed1=1<<5,
|
||||
OCF_FullCon=1<<6,
|
||||
OCF_Inflammable=1<<7,
|
||||
OCF_Chop=1<<8,
|
||||
OCF_Rotate=1<<9,
|
||||
OCF_Exclusive=1<<10,
|
||||
OCF_Entrance=1<<11,
|
||||
OCF_HitSpeed2=1<<12,
|
||||
OCF_HitSpeed3=1<<13,
|
||||
OCF_Collection=1<<14,
|
||||
OCF_Living=1<<15,
|
||||
OCF_HitSpeed4=1<<16,
|
||||
OCF_FightReady=1<<17,
|
||||
OCF_LineConstruct=1<<18,
|
||||
OCF_Prey=1<<19,
|
||||
OCF_AttractLightning=1<<20,
|
||||
OCF_NotContained=1<<21,
|
||||
OCF_CrewMember=1<<22,
|
||||
OCF_Edible=1<<23,
|
||||
OCF_InLiquid=1<<24,
|
||||
OCF_InSolid=1<<25,
|
||||
OCF_InFree=1<<26,
|
||||
OCF_Available=1<<27,
|
||||
OCF_PowerConsumer=1<<28,
|
||||
OCF_PowerSupply=1<<29,
|
||||
OCF_Container=1<<30,
|
||||
OCF_Alive=1<<31;
|
||||
const uint32_t
|
||||
OCF_None = 0,
|
||||
OCF_All = ~OCF_None,
|
||||
OCF_Normal = 1,
|
||||
OCF_Construct = 1<<1,
|
||||
OCF_Grab = 1<<2,
|
||||
OCF_Carryable = 1<<3,
|
||||
OCF_OnFire = 1<<4,
|
||||
OCF_HitSpeed1 = 1<<5,
|
||||
OCF_FullCon = 1<<6,
|
||||
OCF_Inflammable = 1<<7,
|
||||
OCF_Chop = 1<<8,
|
||||
OCF_Rotate = 1<<9,
|
||||
OCF_Exclusive = 1<<10,
|
||||
OCF_Entrance = 1<<11,
|
||||
OCF_HitSpeed2 = 1<<12,
|
||||
OCF_HitSpeed3 = 1<<13,
|
||||
OCF_Collection = 1<<14,
|
||||
OCF_Living = 1<<15,
|
||||
OCF_HitSpeed4 = 1<<16,
|
||||
OCF_LineConstruct = 1<<17,
|
||||
OCF_Prey = 1<<18,
|
||||
OCF_AttractLightning = 1<<19,
|
||||
OCF_NotContained = 1<<20,
|
||||
OCF_CrewMember = 1<<21,
|
||||
OCF_Edible = 1<<22,
|
||||
OCF_InLiquid = 1<<23,
|
||||
OCF_InSolid = 1<<24,
|
||||
OCF_InFree = 1<<25,
|
||||
OCF_Available = 1<<26,
|
||||
OCF_PowerConsumer = 1<<27,
|
||||
OCF_PowerSupply = 1<<28,
|
||||
OCF_Container = 1<<29,
|
||||
OCF_Alive = 1<<30;
|
||||
|
||||
//================================== Contact / Attachment ==============================================
|
||||
|
||||
const BYTE // Directional
|
||||
CNAT_None = 0,
|
||||
CNAT_Left = 1,
|
||||
CNAT_Right = 2,
|
||||
CNAT_Top = 4,
|
||||
CNAT_Bottom = 8,
|
||||
CNAT_Center = 16,
|
||||
// Additional flags
|
||||
CNAT_MultiAttach = 32, // new attachment behaviour; see C4Shape::Attach
|
||||
CNAT_NoCollision = 64; // turn off collision for this vertex
|
||||
CNAT_None = 0,
|
||||
CNAT_Left = 1,
|
||||
CNAT_Right = 2,
|
||||
CNAT_Top = 4,
|
||||
CNAT_Bottom = 8,
|
||||
CNAT_Center = 16,
|
||||
// Additional flags
|
||||
CNAT_MultiAttach = 32, // new attachment behaviour; see C4Shape::Attach
|
||||
CNAT_NoCollision = 64; // turn off collision for this vertex
|
||||
|
||||
const BYTE CNAT_Flags = CNAT_MultiAttach | CNAT_NoCollision; // all attchment flags that can be combined with regular attachment
|
||||
|
||||
|
@ -144,91 +147,97 @@ const int C4DoubleClick = 10;
|
|||
|
||||
//=================================== Control Commands ======================================================
|
||||
|
||||
const BYTE COM_Single = 64,
|
||||
COM_Double = 128;
|
||||
const BYTE
|
||||
COM_Single = 64,
|
||||
COM_Double = 128;
|
||||
|
||||
const BYTE COM_None = 0;
|
||||
const BYTE
|
||||
COM_None = 0,
|
||||
COM_Left = 1,
|
||||
COM_Right = 2,
|
||||
COM_Up = 3,
|
||||
COM_Down = 4,
|
||||
COM_Throw = 5,
|
||||
COM_Dig = 6,
|
||||
|
||||
const BYTE COM_Left = 1,
|
||||
COM_Right = 2,
|
||||
COM_Up = 3,
|
||||
COM_Down = 4,
|
||||
COM_Throw = 5,
|
||||
COM_Dig = 6,
|
||||
COM_Special = 7,
|
||||
COM_Special2 = 8,
|
||||
|
||||
COM_Special = 7,
|
||||
COM_Special2 = 8,
|
||||
COM_Contents = 9,
|
||||
|
||||
COM_Contents = 9,
|
||||
COM_WheelUp = 10,
|
||||
COM_WheelDown= 11,
|
||||
|
||||
COM_WheelUp = 10,
|
||||
COM_WheelDown= 11,
|
||||
COM_Left_R = COM_Left + 16,
|
||||
COM_Right_R = COM_Right + 16,
|
||||
COM_Up_R = COM_Up + 16,
|
||||
COM_Down_R = COM_Down + 16,
|
||||
COM_Throw_R = COM_Throw + 16,
|
||||
COM_Dig_R = COM_Dig + 16,
|
||||
COM_Special_R = COM_Special + 16,
|
||||
COM_Special2_R = COM_Special2 + 16,
|
||||
COM_ReleaseFirst = COM_Left_R,
|
||||
COM_ReleaseLast = COM_Special2_R,
|
||||
|
||||
COM_Left_R = COM_Left + 16,
|
||||
COM_Right_R = COM_Right + 16,
|
||||
COM_Up_R = COM_Up + 16,
|
||||
COM_Down_R = COM_Down + 16,
|
||||
COM_Throw_R = COM_Throw + 16,
|
||||
COM_Dig_R = COM_Dig + 16,
|
||||
COM_Special_R = COM_Special + 16,
|
||||
COM_Special2_R = COM_Special2 + 16,
|
||||
COM_ReleaseFirst = COM_Left_R,
|
||||
COM_ReleaseLast = COM_Special2_R,
|
||||
COM_Left_S = COM_Left | COM_Single,
|
||||
COM_Right_S = COM_Right | COM_Single,
|
||||
COM_Up_S = COM_Up | COM_Single,
|
||||
COM_Down_S = COM_Down | COM_Single,
|
||||
COM_Throw_S = COM_Throw | COM_Single,
|
||||
COM_Dig_S = COM_Dig | COM_Single,
|
||||
COM_Special_S = COM_Special | COM_Single,
|
||||
COM_Special2_S = COM_Special2 | COM_Single,
|
||||
|
||||
COM_Left_S = COM_Left | COM_Single,
|
||||
COM_Right_S = COM_Right | COM_Single,
|
||||
COM_Up_S = COM_Up | COM_Single,
|
||||
COM_Down_S = COM_Down | COM_Single,
|
||||
COM_Throw_S = COM_Throw | COM_Single,
|
||||
COM_Dig_S = COM_Dig | COM_Single,
|
||||
COM_Special_S = COM_Special | COM_Single,
|
||||
COM_Special2_S = COM_Special2 | COM_Single,
|
||||
COM_Left_D = COM_Left | COM_Double,
|
||||
COM_Right_D = COM_Right | COM_Double,
|
||||
COM_Up_D = COM_Up | COM_Double,
|
||||
COM_Down_D = COM_Down | COM_Double,
|
||||
COM_Throw_D = COM_Throw | COM_Double,
|
||||
COM_Dig_D = COM_Dig | COM_Double,
|
||||
COM_Special_D = COM_Special | COM_Double,
|
||||
COM_Special2_D = COM_Special2 | COM_Double;
|
||||
|
||||
COM_Left_D = COM_Left | COM_Double,
|
||||
COM_Right_D = COM_Right | COM_Double,
|
||||
COM_Up_D = COM_Up | COM_Double,
|
||||
COM_Down_D = COM_Down | COM_Double,
|
||||
COM_Throw_D = COM_Throw | COM_Double,
|
||||
COM_Dig_D = COM_Dig | COM_Double,
|
||||
COM_Special_D = COM_Special | COM_Double,
|
||||
COM_Special2_D = COM_Special2 | COM_Double;
|
||||
const BYTE
|
||||
COM_CursorLeft = 30,
|
||||
COM_CursorRight = 31;
|
||||
|
||||
const BYTE COM_CursorLeft = 30,
|
||||
COM_CursorRight = 31;
|
||||
const BYTE
|
||||
COM_Help = 35,
|
||||
COM_PlayerMenu = 36,
|
||||
COM_Chat = 37;
|
||||
|
||||
const BYTE COM_Help = 35,
|
||||
COM_PlayerMenu = 36,
|
||||
COM_Chat = 37;
|
||||
const BYTE
|
||||
COM_MenuEnter = 38,
|
||||
COM_MenuEnterAll = 39,
|
||||
COM_MenuClose = 40,
|
||||
COM_MenuShowText = 42,
|
||||
COM_MenuLeft = 52,
|
||||
COM_MenuRight = 53,
|
||||
COM_MenuUp = 54,
|
||||
COM_MenuDown = 55,
|
||||
COM_MenuSelect = 60,
|
||||
|
||||
const BYTE COM_MenuEnter = 38,
|
||||
COM_MenuEnterAll = 39,
|
||||
COM_MenuClose = 40,
|
||||
COM_MenuShowText = 42,
|
||||
COM_MenuLeft = 52,
|
||||
COM_MenuRight = 53,
|
||||
COM_MenuUp = 54,
|
||||
COM_MenuDown = 55,
|
||||
COM_MenuSelect = 60,
|
||||
COM_MenuFirst = COM_MenuEnter,
|
||||
COM_MenuLast = COM_MenuSelect,
|
||||
|
||||
COM_MenuFirst = COM_MenuEnter,
|
||||
COM_MenuLast = COM_MenuSelect,
|
||||
|
||||
COM_MenuNavigation1 = COM_MenuShowText,
|
||||
COM_MenuNavigation2 = COM_MenuSelect;
|
||||
COM_MenuNavigation1 = COM_MenuShowText,
|
||||
COM_MenuNavigation2 = COM_MenuSelect;
|
||||
|
||||
//=================================== SendCommand ========================================
|
||||
const int32_t C4P_Command_None = 0,
|
||||
C4P_Command_Set = 1,
|
||||
C4P_Command_Add = 2,
|
||||
C4P_Command_Append = 4,
|
||||
C4P_Command_Range = 8;
|
||||
const int32_t
|
||||
C4P_Command_None = 0,
|
||||
C4P_Command_Set = 1,
|
||||
C4P_Command_Add = 2,
|
||||
C4P_Command_Append = 4,
|
||||
C4P_Command_Range = 8;
|
||||
|
||||
//=================================== Owners ==============================================
|
||||
|
||||
const int NO_OWNER = -1,
|
||||
ANY_OWNER = -2,
|
||||
BY_OWNER = 10000,
|
||||
BY_HOSTILE_OWNER = 20000;
|
||||
const int
|
||||
NO_OWNER = -1,
|
||||
ANY_OWNER = -2,
|
||||
BY_OWNER = 10000,
|
||||
BY_HOSTILE_OWNER = 20000;
|
||||
|
||||
//=================================== League (escape those damn circular includes =========
|
||||
|
||||
|
@ -243,22 +252,22 @@ enum C4LeagueDisconnectReason
|
|||
|
||||
enum C4PlayerType
|
||||
{
|
||||
C4PT_None=0,
|
||||
C4PT_User=1, // Normal player
|
||||
C4PT_Script=2 // AI players, etc.
|
||||
C4PT_None = 0,
|
||||
C4PT_User = 1, // Normal player
|
||||
C4PT_Script = 2 // AI players, etc.
|
||||
};
|
||||
|
||||
//=================================== AllowPictureStack (DefCore value)
|
||||
|
||||
enum C4AllowPictureStack
|
||||
{
|
||||
APS_Color= 1<<0,
|
||||
APS_Graphics=1<<1,
|
||||
APS_Name= 1<<2,
|
||||
APS_Overlay= 1<<3
|
||||
APS_Color = 1<<0,
|
||||
APS_Graphics = 1<<1,
|
||||
APS_Name = 1<<2,
|
||||
APS_Overlay = 1<<3
|
||||
};
|
||||
|
||||
// Object size
|
||||
const int32_t FullCon=100000;
|
||||
const int32_t FullCon = 100000;
|
||||
|
||||
#endif // INC_C4Constants
|
||||
|
|
|
@ -59,7 +59,6 @@ const char *ProcedureName[C4D_MaxDFA]={ "WALK",
|
|||
"LIFT",
|
||||
"FLOAT",
|
||||
"ATTACH",
|
||||
"FIGHT",
|
||||
"CONNECT",
|
||||
"PULL"
|
||||
};
|
||||
|
@ -138,7 +137,6 @@ void C4Def::DefaultDefCore()
|
|||
NoBreath=0;
|
||||
ConSizeOff=0;
|
||||
NoSell=NoGet=0;
|
||||
NoFight=0;
|
||||
NeededGfxMode=0;
|
||||
NoTransferZones=0;
|
||||
}
|
||||
|
@ -358,7 +356,6 @@ void C4Def::CompileFunc(StdCompiler *pComp)
|
|||
pComp->Value(mkNamingAdapt(ConSizeOff, "ConSizeOff", 0 ));
|
||||
pComp->Value(mkNamingAdapt(NoSell, "NoSell", 0 ));
|
||||
pComp->Value(mkNamingAdapt(NoGet, "NoGet", 0 ));
|
||||
pComp->Value(mkNamingAdapt(NoFight, "NoFight", 0 ));
|
||||
pComp->Value(mkNamingAdapt(NoTransferZones, "NoTransferZones", 0 ));
|
||||
pComp->Value(mkNamingAdapt(AutoContextMenu, "AutoContextMenu", 0 ));
|
||||
pComp->Value(mkNamingAdapt(NeededGfxMode, "NeededGfxMode", 0 ));
|
||||
|
|
|
@ -191,7 +191,6 @@ public:
|
|||
int32_t ConSizeOff; // number of pixels to be subtracted from the needed height for this building
|
||||
int32_t NoSell; // if set, object can't be sold (doesn't even appear in sell-menu)
|
||||
int32_t NoGet; // if set, object can't be taken out of a containers manually (doesn't appear in get/activate-menus)
|
||||
int32_t NoFight; // if set, object is never OCF_FightReady
|
||||
int32_t NeededGfxMode; // if set, the def will only be loaded in given gfx mode
|
||||
int32_t RotatedEntrance; // 0 entrance not rotateable, 1 entrance always, 2-360 entrance within this rotation
|
||||
int32_t NoTransferZones;
|
||||
|
@ -359,11 +358,10 @@ inline C4Def *C4Id2Def(C4ID id)
|
|||
#define DFA_LIFT 12
|
||||
#define DFA_FLOAT 13
|
||||
#define DFA_ATTACH 14
|
||||
#define DFA_FIGHT 15
|
||||
#define DFA_CONNECT 16
|
||||
#define DFA_PULL 17
|
||||
#define DFA_CONNECT 15
|
||||
#define DFA_PULL 16
|
||||
|
||||
#define C4D_MaxDFA 18
|
||||
#define C4D_MaxDFA 17
|
||||
|
||||
// procedure name table
|
||||
extern const char *ProcedureName[C4D_MaxDFA];
|
||||
|
|
|
@ -215,9 +215,6 @@ void C4GameObjects::CrossCheck() // Every Tick1 by ExecObjects
|
|||
|
||||
// Checks for this frame
|
||||
focf=tocf=OCF_None;
|
||||
// Medium level: Fight
|
||||
if (!::Game.iTick5)
|
||||
{ focf|=OCF_FightReady; tocf|=OCF_FightReady; }
|
||||
// Very low level: Incineration
|
||||
if (!::Game.iTick35)
|
||||
{ focf|=OCF_OnFire; tocf|=OCF_Inflammable; }
|
||||
|
@ -229,25 +226,10 @@ void C4GameObjects::CrossCheck() // Every Tick1 by ExecObjects
|
|||
{
|
||||
ocf1=obj1->OCF; ocf2=tocf;
|
||||
if ((obj2=AtObject(obj1->GetX(),obj1->GetY(),ocf2,obj1)))
|
||||
{
|
||||
// Incineration
|
||||
if ((ocf1 & OCF_OnFire) && (ocf2 & OCF_Inflammable))
|
||||
if (!Random(obj2->Def->ContactIncinerate))
|
||||
{ obj2->Incinerate(obj1->GetFireCausePlr(), false, obj1); continue; }
|
||||
// Fight
|
||||
if ((ocf1 & OCF_FightReady) && (ocf2 & OCF_FightReady))
|
||||
if (::Players.Hostile(obj1->Owner,obj2->Owner))
|
||||
{
|
||||
// RejectFight callback
|
||||
C4AulParSet parset1(C4VObj(obj2) );
|
||||
C4AulParSet parset2(C4VObj(obj1) );
|
||||
if (obj1->Call(PSF_RejectFight, &parset1).getBool() ) continue;
|
||||
if (obj2->Call(PSF_RejectFight, &parset2).getBool() ) continue;
|
||||
ObjectActionFight(obj1,obj2);
|
||||
ObjectActionFight(obj2,obj1);
|
||||
continue;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Reverse area check: Checks for all obj2 at obj1
|
||||
|
@ -314,38 +296,6 @@ void C4GameObjects::CrossCheck() // Every Tick1 by ExecObjects
|
|||
}
|
||||
out1: ;
|
||||
}
|
||||
|
||||
// Contained-Check: Checks for matching Contained
|
||||
|
||||
// Checks for this frame
|
||||
focf=tocf=OCF_None;
|
||||
// Low level: Fight
|
||||
if (!::Game.iTick10)
|
||||
{ focf|=OCF_FightReady; tocf|=OCF_FightReady; }
|
||||
|
||||
if (focf && tocf)
|
||||
for (C4ObjectList::iterator iter = begin(); iter != end() && (obj1=*iter); ++iter)
|
||||
if (obj1->Status && obj1->Contained && (obj1->OCF & focf))
|
||||
{
|
||||
for (C4ObjectList::iterator iter2 = obj1->Contained->Contents.begin(); iter2 != end() && (obj2=*iter2); ++iter2)
|
||||
if (obj2->Status && obj2->Contained && (obj2!=obj1) && (obj2->OCF & tocf))
|
||||
if (obj1->Layer == obj2->Layer)
|
||||
{
|
||||
ocf1=obj1->OCF; ocf2=obj2->OCF;
|
||||
// Fight
|
||||
if ((ocf1 & OCF_FightReady) && (ocf2 & OCF_FightReady))
|
||||
if (::Players.Hostile(obj1->Owner,obj2->Owner))
|
||||
{
|
||||
ObjectActionFight(obj1,obj2);
|
||||
ObjectActionFight(obj2,obj1);
|
||||
// obj1 might have been tampered with
|
||||
if (!obj1->Status || obj1->Contained || !(obj1->OCF & focf))
|
||||
goto out2;
|
||||
continue;
|
||||
}
|
||||
}
|
||||
out2: ;
|
||||
}
|
||||
}
|
||||
|
||||
C4Object* C4GameObjects::AtObject(int ctx, int cty, DWORD &ocf, C4Object *exclude)
|
||||
|
|
|
@ -178,7 +178,6 @@ struct C4PhysInfoNameMap_t { const char *szName; C4PhysicalInfo::Offset off; } C
|
|||
{ "Swim", &C4PhysicalInfo::Swim },
|
||||
{ "Throw", &C4PhysicalInfo::Throw },
|
||||
{ "Push", &C4PhysicalInfo::Push },
|
||||
{ "Fight", &C4PhysicalInfo::Fight },
|
||||
{ "Magic", &C4PhysicalInfo::Magic },
|
||||
{ "Float", &C4PhysicalInfo::Float },
|
||||
{ "CanScale", &C4PhysicalInfo::CanScale },
|
||||
|
@ -206,7 +205,6 @@ void C4PhysicalInfo::PromotionUpdate(int32_t iRank, bool fUpdateTrainablePhysica
|
|||
Scale = pTrainDef->Physical.Scale + (C4MaxPhysical - pTrainDef->Physical.Scale) * iTrainRank / 20;
|
||||
Hangle = pTrainDef->Physical.Hangle + (C4MaxPhysical - pTrainDef->Physical.Hangle) * iTrainRank / 20;
|
||||
Swim = pTrainDef->Physical.Swim + (C4MaxPhysical - pTrainDef->Physical.Swim) * iTrainRank / 20;
|
||||
Fight = pTrainDef->Physical.Fight + (C4MaxPhysical - pTrainDef->Physical.Fight) * iTrainRank / 20;
|
||||
// do script updates for any physicals as required (this will train stuff like magic)
|
||||
const char *szPhysName; C4PhysicalInfo::Offset PhysOff;
|
||||
for (int32_t iPhysIdx=0; (szPhysName = GetNameByIndex(iPhysIdx, &PhysOff)); ++iPhysIdx)
|
||||
|
|
|
@ -48,7 +48,6 @@ public:
|
|||
int32_t Swim;
|
||||
int32_t Throw;
|
||||
int32_t Push;
|
||||
int32_t Fight;
|
||||
int32_t Magic;
|
||||
int32_t CanScale;
|
||||
int32_t CanHangle;
|
||||
|
|
|
@ -818,11 +818,6 @@ void C4Object::SetOCF()
|
|||
OCF|=OCF_Living;
|
||||
if (Alive) OCF|=OCF_Alive;
|
||||
}
|
||||
// OCF_FightReady
|
||||
if (OCF & OCF_Alive)
|
||||
if (!pActionDef || (!pActionDef->GetPropertyInt(P_ObjectDisabled)))
|
||||
if (!Def->NoFight)
|
||||
OCF|=OCF_FightReady;
|
||||
// OCF_LineConstruct
|
||||
if (OCF & OCF_FullCon)
|
||||
if (Def->LineConnect)
|
||||
|
@ -929,11 +924,6 @@ void C4Object::UpdateOCF()
|
|||
if (!pActionDef || (!pActionDef->GetPropertyInt(P_ObjectDisabled)))
|
||||
if (NoCollectDelay==0)
|
||||
OCF|=OCF_Collection;
|
||||
// OCF_FightReady
|
||||
if (OCF & OCF_Alive)
|
||||
if (!pActionDef || (!pActionDef->GetPropertyInt(P_ObjectDisabled)))
|
||||
if (!Def->NoFight)
|
||||
OCF|=OCF_FightReady;
|
||||
// OCF_NotContained
|
||||
if (!Contained)
|
||||
OCF|=OCF_NotContained;
|
||||
|
@ -4477,43 +4467,6 @@ void C4Object::ExecAction()
|
|||
Mobile=1;
|
||||
break;
|
||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
case DFA_FIGHT:
|
||||
// Valid check
|
||||
if (!Action.Target || (Action.Target->GetProcedure()!=DFA_FIGHT))
|
||||
{ ObjectActionStand(this); return; }
|
||||
|
||||
// Fighting through doors only if doors open
|
||||
if (Action.Target->Contained != Contained)
|
||||
if ((Contained && !Contained->EntranceStatus) || (Action.Target->Contained && !Action.Target->Contained->EntranceStatus))
|
||||
{ ObjectActionStand(this); return; }
|
||||
|
||||
// Physical training
|
||||
if (!::Game.iTick5)
|
||||
TrainPhysical(&C4PhysicalInfo::Fight, 1, C4MaxPhysical);
|
||||
|
||||
// Direction
|
||||
if (Action.Target->GetX()>GetX()) SetDir(DIR_Right);
|
||||
if (Action.Target->GetX()<GetX()) SetDir(DIR_Left);
|
||||
// Position
|
||||
iTargetX=GetX();
|
||||
if (Action.Dir==DIR_Left) iTargetX=Action.Target->GetX()+Action.Target->Shape.Wdt/2+2;
|
||||
if (Action.Dir==DIR_Right) iTargetX=Action.Target->GetX()-Action.Target->Shape.Wdt/2-2;
|
||||
lLimit=ValByPhysical(95, pPhysical->Walk);
|
||||
if (GetX()==iTargetX) Towards(xdir,Fix0,lLimit);
|
||||
if (GetX()<iTargetX) Towards(xdir,+lLimit,lLimit);
|
||||
if (GetX()>iTargetX) Towards(xdir,-lLimit,lLimit);
|
||||
// Distance check
|
||||
if ( (Abs(GetX()-Action.Target->GetX())>Shape.Wdt)
|
||||
|| (Abs(GetY()-Action.Target->GetY())>Shape.Wdt) )
|
||||
{ ObjectActionStand(this); return; }
|
||||
// Other
|
||||
Action.t_attach|=CNAT_Bottom;
|
||||
ydir=0;
|
||||
Mobile=1;
|
||||
// Experience
|
||||
if (!::Game.iTick35) DoExperience(+2);
|
||||
break;
|
||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
case DFA_LIFT:
|
||||
// Valid check
|
||||
if (!Action.Target) { SetAction(0); return; }
|
||||
|
|
|
@ -167,11 +167,6 @@ bool ObjectActionPush(C4Object *cObj, C4Object *target)
|
|||
return cObj->SetActionByName("Push",target);
|
||||
}
|
||||
|
||||
bool ObjectActionFight(C4Object *cObj, C4Object *target)
|
||||
{
|
||||
return cObj->SetActionByName("Fight",target);
|
||||
}
|
||||
|
||||
bool ObjectActionChop(C4Object *cObj, C4Object *target)
|
||||
{
|
||||
return cObj->SetActionByName("Chop",target);
|
||||
|
@ -751,9 +746,6 @@ bool ObjectComTake2(C4Object *cObj) // by C4CMD_Take2
|
|||
bool ObjectComPunch(C4Object *cObj, C4Object *pTarget, int32_t punch)
|
||||
{
|
||||
if (!cObj || !pTarget) return false;
|
||||
if (!punch)
|
||||
if (pTarget->GetPhysical()->Fight)
|
||||
punch=BoundBy<int32_t>(5*cObj->GetPhysical()->Fight/pTarget->GetPhysical()->Fight,0,10);
|
||||
if (!punch) return true;
|
||||
bool fBlowStopped = !!pTarget->Call(PSF_QueryCatchBlow,&C4AulParSet(C4VObj(cObj)));
|
||||
if (fBlowStopped && punch>1) punch=punch/2; // half damage for caught blow, so shield+armor help in fistfight and vs monsters
|
||||
|
|
|
@ -53,7 +53,6 @@ bool ObjectActionBuild(C4Object *cObj, C4Object *pTarget);
|
|||
bool ObjectActionPush(C4Object *cObj, C4Object *pTarget);
|
||||
bool ObjectActionChop(C4Object *cObj, C4Object *pTarget);
|
||||
bool ObjectActionCornerScale(C4Object *cObj);
|
||||
bool ObjectActionFight(C4Object *cObj, C4Object *pTarget);
|
||||
|
||||
bool ObjectComMovement(C4Object *cObj, int32_t iComDir);
|
||||
bool ObjectComTurn(C4Object *cObj);
|
||||
|
|
|
@ -65,7 +65,7 @@
|
|||
#define C4FxCall_EngAsphyxiation 37 // energy loss through asphyxiaction
|
||||
#define C4FxCall_EngCorrosion 38 // energy loss through corrosion (acid)
|
||||
#define C4FxCall_EngStruct 39 // regular structure energy loss (normally not called)
|
||||
#define C4FxCall_EngGetPunched 40 // energy loss during fighting
|
||||
#define C4FxCall_EngGetPunched 40 // energy loss from Punch
|
||||
|
||||
// fire drawing modes
|
||||
#define C4Fx_FireMode_Default 0 // determine mode by category
|
||||
|
|
|
@ -4422,25 +4422,6 @@ static bool FnDrawMaterialQuad(C4AulContext* ctx, C4String *szMaterial, long iX1
|
|||
return !! ::Landscape.DrawQuad(iX1, iY1, iX2, iY2, iX3, iY3, iX4, iY4, szMat, draw_mode == DMQ_Sub, draw_mode==DMQ_Bridge);
|
||||
}
|
||||
|
||||
static bool FnFightWith(C4AulObjectContext *ctx, C4Object *pTarget)
|
||||
{
|
||||
// safety
|
||||
if (!pTarget) return false;
|
||||
C4Object *pClonk = ctx->Obj;
|
||||
// check OCF
|
||||
if (~(pTarget->OCF & pClonk->OCF) & OCF_FightReady) return false;
|
||||
// RejectFight callback
|
||||
C4AulParSet parset1(C4VObj(pTarget) );
|
||||
C4AulParSet parset2(C4VObj(pClonk) );
|
||||
if (pTarget->Call(PSF_RejectFight, &parset1).getBool() ) return false;
|
||||
if (pClonk->Call(PSF_RejectFight, &parset2).getBool() ) return false;
|
||||
// begin fighting
|
||||
ObjectActionFight(pClonk,pTarget);
|
||||
ObjectActionFight(pTarget,pClonk);
|
||||
// success
|
||||
return true;
|
||||
}
|
||||
|
||||
static bool FnSetFilmView(C4AulContext *ctx, long iToPlr)
|
||||
{
|
||||
// check player
|
||||
|
@ -6237,7 +6218,6 @@ void InitFunctionMap(C4AulScriptEngine *pEngine)
|
|||
AddFunc(pEngine, "SetLandscapePixel", FnSetLandscapePixel);
|
||||
AddFunc(pEngine, "SetObjectOrder", FnSetObjectOrder);
|
||||
AddFunc(pEngine, "DrawMaterialQuad", FnDrawMaterialQuad);
|
||||
AddFunc(pEngine, "FightWith", FnFightWith);
|
||||
AddFunc(pEngine, "SetFilmView", FnSetFilmView);
|
||||
AddFunc(pEngine, "ClearMenuItems", FnClearMenuItems);
|
||||
AddFunc(pEngine, "GetObjectLayer", FnGetObjectLayer, false);
|
||||
|
@ -6428,7 +6408,6 @@ C4ScriptConstDef C4ScriptConstMap[]=
|
|||
{ "OCF_Collection" ,C4V_Int, OCF_Collection},
|
||||
{ "OCF_Living" ,C4V_Int, OCF_Living},
|
||||
{ "OCF_HitSpeed4" ,C4V_Int, OCF_HitSpeed4},
|
||||
{ "OCF_FightReady" ,C4V_Int, OCF_FightReady},
|
||||
{ "OCF_LineConstruct" ,C4V_Int, OCF_LineConstruct},
|
||||
{ "OCF_Prey" ,C4V_Int, OCF_Prey},
|
||||
{ "OCF_AttractLightning" ,C4V_Int, OCF_AttractLightning},
|
||||
|
@ -6512,7 +6491,7 @@ C4ScriptConstDef C4ScriptConstMap[]=
|
|||
{ "FX_Call_EngAsphyxiation" ,C4V_Int, C4FxCall_EngAsphyxiation }, // energy loss through asphyxiaction
|
||||
{ "FX_Call_EngCorrosion" ,C4V_Int, C4FxCall_EngCorrosion }, // energy loss through corrosion (acid)
|
||||
{ "FX_Call_EngStruct" ,C4V_Int, C4FxCall_EngStruct }, // regular structure energy loss (normally not called)
|
||||
{ "FX_Call_EngGetPunched" ,C4V_Int, C4FxCall_EngGetPunched }, // energy loss during fighting
|
||||
{ "FX_Call_EngGetPunched" ,C4V_Int, C4FxCall_EngGetPunched }, // energy loss from punch
|
||||
|
||||
{ "GFXOV_MODE_None" ,C4V_Int, C4GraphicsOverlay::MODE_None }, // gfx overlay modes
|
||||
{ "GFXOV_MODE_Base" ,C4V_Int, C4GraphicsOverlay::MODE_Base }, //
|
||||
|
|
|
@ -167,7 +167,6 @@ bool C4ValueToMatrix(const C4ValueArray& array, StdMeshMatrix* matrix);
|
|||
#define PSF_RejectHostilityChange "~RejectHostilityChange" // int iPlr1, int iPlr2, bool fNewHostility
|
||||
#define PSF_RejectTeamSwitch "~RejectTeamSwitch" // int iPlr, int idNewTeam
|
||||
#define PSF_RejectEntrance "~RejectEntrance" // C4Object *pIntoObj
|
||||
#define PSF_RejectFight "~RejectFight" // C4Object* pEnemy
|
||||
#define PSF_RejectCollection "~RejectCollect" // idObject, pObject
|
||||
#define PSF_RejectContents "~RejectContents" // blocks opening of activate/get/contents menus; no parameters
|
||||
|
||||
|
|
|
@ -514,8 +514,6 @@ void C4StartupPlrSelDlg::CrewListItem::SetSelectionInfo(C4GUI::TextWindow *pSele
|
|||
&C4Startup::Get()->Graphics.BookFont, ClrPlayerItem, false, false);
|
||||
pSelectionInfo->AddTextLine(GetPhysicalTextLine(Core.Physical.Push, "IDS_DESC_PUSH").getData(),
|
||||
&C4Startup::Get()->Graphics.BookFont, ClrPlayerItem, false, false);
|
||||
pSelectionInfo->AddTextLine(GetPhysicalTextLine(Core.Physical.Fight, "IDS_DESC_FIGHT").getData(),
|
||||
&C4Startup::Get()->Graphics.BookFont, ClrPlayerItem, false, false);
|
||||
if (Core.Physical.Magic) pSelectionInfo->AddTextLine(GetPhysicalTextLine(Core.Physical.Magic, "IDS_DESC_MAGIC").getData(),
|
||||
&C4Startup::Get()->Graphics.BookFont, ClrPlayerItem, false, false);
|
||||
pSelectionInfo->UpdateHeight();
|
||||
|
|
Loading…
Reference in New Issue