OpenClonk
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros
C4ObjectCom.cpp
Go to the documentation of this file.
1 /*
2  * OpenClonk, http://www.openclonk.org
3  *
4  * Copyright (c) 1998-2000, Matthes Bender
5  * Copyright (c) 2001-2009, RedWolf Design GmbH, http://www.clonk.de/
6  * Copyright (c) 2009-2016, The OpenClonk Team and contributors
7  *
8  * Distributed under the terms of the ISC license; see accompanying file
9  * "COPYING" for details.
10  *
11  * "Clonk" is a registered trademark of Matthes Bender, used with permission.
12  * See accompanying file "TRADEMARK" for details.
13  *
14  * To redistribute this file separately, substitute the full license texts
15  * for the above references.
16  */
17 
18 /* Lots of handler functions for object action */
19 
20 #include "C4Include.h"
21 #include "object/C4ObjectCom.h"
22 
23 #include "script/C4Effect.h"
24 #include "object/C4Def.h"
25 #include "object/C4Object.h"
26 #include "game/C4Physics.h"
27 #include "object/C4Command.h"
28 #include "lib/C4Random.h"
29 #include "gui/C4GameMessage.h"
30 #include "object/C4ObjectMenu.h"
31 #include "player/C4Player.h"
33 #include "landscape/C4Material.h"
34 #include "game/C4Game.h"
35 #include "player/C4PlayerList.h"
36 #include "object/C4GameObjects.h"
37 
38 bool SimFlightHitsLiquid(C4Real fcx, C4Real fcy, C4Real xdir, C4Real ydir);
39 
41 {
42  if (!cObj->SetActionByName("Walk")) return false;
43  return true;
44 }
45 
47 {
48  cObj->Action.ComDir=COMD_Stop;
49  if (!ObjectActionWalk(cObj)) return false;
50  return true;
51 }
52 
53 bool ObjectActionJump(C4Object *cObj, C4Real xdir, C4Real ydir, bool fByCom)
54 {
55  // scripted jump?
56  assert(cObj);
57  C4AulParSet pars(fixtoi(xdir, 100), fixtoi(ydir, 100), fByCom);
58  if (!!cObj->Call(PSF_OnActionJump, &pars)) return true;
59  // hardcoded jump by action
60  if (!cObj->SetActionByName("Jump")) return false;
61  cObj->xdir=xdir; cObj->ydir=ydir;
62  cObj->Mobile=1;
63  // unstick from ground, because jump command may be issued in an Action-callback,
64  // where attach-values have already been determined for that frame
65  cObj->Action.t_attach&=~CNAT_Bottom;
66  return true;
67 }
68 
69 bool ObjectActionDive(C4Object *cObj, C4Real xdir, C4Real ydir)
70 {
71  if (!cObj->SetActionByName("Dive")) return false;
72  cObj->xdir=xdir; cObj->ydir=ydir;
73  cObj->Mobile=1;
74  // unstick from ground, because jump command may be issued in an Action-callback,
75  // where attach-values have already been determined for that frame
76  cObj->Action.t_attach&=~CNAT_Bottom;
77  return true;
78 }
79 
80 bool ObjectActionTumble(C4Object *cObj, int32_t dir, C4Real xdir, C4Real ydir)
81 {
82  if (!cObj->SetActionByName("Tumble")) return false;
83  cObj->SetDir(dir);
84  cObj->xdir=xdir; cObj->ydir=ydir;
85  return true;
86 }
87 
89 {
90  if (!cObj->SetActionByName("GetPunched")) return false;
91  cObj->xdir=xdir; cObj->ydir=ydir;
92  return true;
93 }
94 
96 {
97  if (!cObj->SetActionByName("KneelDown")) return false;
98  return true;
99 }
100 
101 bool ObjectActionFlat(C4Object *cObj, int32_t dir)
102 {
103  if (!cObj->SetActionByName("FlatUp")) return false;
104  cObj->SetDir(dir);
105  return true;
106 }
107 
108 bool ObjectActionScale(C4Object *cObj, int32_t dir)
109 {
110  if (!cObj->SetActionByName("Scale")) return false;
111  cObj->SetDir(dir);
112  return true;
113 }
114 
116 {
117  if (!cObj->SetActionByName("Hangle")) return false;
118  return true;
119 }
120 
121 bool ObjectActionThrow(C4Object *cObj, C4Object *pThing)
122 {
123  // No object specified, first from contents
124  if (!pThing) pThing = cObj->Contents.GetObject();
125  // Nothing to throw
126  if (!pThing) return false;
127  // Force and direction
129  int32_t iDir=1; if (cObj->Action.Dir==DIR_Left) iDir=-1;
130  // Set action
131  if (!cObj->SetActionByName("Throw")) return false;
132  // Exit object
133  pThing->Exit(cObj->GetX(),
134  cObj->GetY()+cObj->Shape.y-1,
135  Random(360),
136  pthrow*iDir+cObj->xdir,-pthrow+cObj->ydir,pthrow*iDir);
137  // Success
138  return true;
139 }
140 
142 {
143  if (!cObj->SetActionByName("Dig")) return false;
144  cObj->Action.Data=0; // Material Dig2Object request
145  return true;
146 }
147 
148 bool ObjectActionPush(C4Object *cObj, C4Object *target)
149 {
150  return cObj->SetActionByName("Push",target);
151 }
152 
153 static bool CornerScaleOkay(C4Object *cObj, int32_t iRangeX, int32_t iRangeY)
154 {
155  int32_t ctx,cty;
156  cty=cObj->GetY()-iRangeY;
157  if (cObj->Action.Dir==DIR_Left) ctx=cObj->GetX()-iRangeX;
158  else ctx=cObj->GetX()+iRangeX;
159  cObj->ContactCheck(ctx,cty); // (resets VtxContact & t_contact)
160  if (!(cObj->t_contact & CNAT_Top))
161  if (!(cObj->t_contact & CNAT_Left))
162  if (!(cObj->t_contact & CNAT_Right))
163  if (!(cObj->t_contact & CNAT_Bottom))
164  return true;
165  return false;
166 }
167 
169 {
170  int32_t iRangeX = 1, iRangeY = 1;
171  if (!CornerScaleOkay(cObj,iRangeX,iRangeY)) return false;
172  // Do corner scale
173  if (!cObj->SetActionByName("KneelUp"))
174  cObj->SetActionByName("Walk");
175  cObj->xdir=cObj->ydir=0;
176  if (cObj->Action.Dir==DIR_Left) cObj->fix_x-=itofix(iRangeX);
177  else cObj->fix_x+=itofix(iRangeX);
178  cObj->fix_y-=itofix(iRangeY);
179  return true;
180 }
181 
183 {
184  // Cease current action
185  cObj->SetActionByName("Idle");
186  // Action walk if possible
187  return ObjectActionStand(cObj);
188 }
189 
190 bool ObjectComGrab(C4Object *cObj, C4Object *pTarget)
191 {
192  if (!pTarget) return false;
193  if (cObj->GetProcedure()!=DFA_WALK) return false;
194  if (!ObjectActionPush(cObj,pTarget)) return false;
195  cObj->Call(PSF_Grab, &C4AulParSet(pTarget, true));
196  if (pTarget->Status && cObj->Status)
197  pTarget->Call(PSF_Grabbed, &C4AulParSet(cObj, true));
198  return true;
199 }
200 
202 {
203  // Only if pushing, -> stand
204  if (cObj->GetProcedure() == DFA_PUSH)
205  {
206  C4Object *pTarget = cObj->Action.Target;
207  if (ObjectActionStand(cObj))
208  {
209  if (!cObj->CloseMenu(false)) return false;
210  cObj->Call(PSF_Grab, &C4AulParSet(pTarget, false));
211  // clear action target
212  cObj->Action.Target = nullptr;
213  if (pTarget && pTarget->Status && cObj->Status)
214  {
215  pTarget->Call(PSF_Grabbed, &C4AulParSet(cObj, false));
216  }
217  return true;
218  }
219  }
220 
221  return false;
222 }
223 
224 bool ObjectComJump(C4Object *cObj) // by ObjectComUp, ExecCMDFMoveTo, FnJump
225 {
226  // Only if walking
227  if (cObj->GetProcedure()!=DFA_WALK) return false;
228  // Calculate direction & forces
229  C4Real TXDir=Fix0;
230  C4PropList *pActionWalk = cObj->GetAction();
231  C4Real iPhysicalWalk = C4REAL100(pActionWalk->GetPropertyInt(P_Speed)) * itofix(cObj->GetCon(), FullCon);
232  C4Real iPhysicalJump = C4REAL100(cObj->GetPropertyInt(P_JumpSpeed)) * itofix(cObj->GetCon(), FullCon);
233 
234  if (cObj->Action.ComDir==COMD_Left || cObj->Action.ComDir==COMD_UpLeft) TXDir=-iPhysicalWalk;
235  else if (cObj->Action.ComDir==COMD_Right || cObj->Action.ComDir==COMD_UpRight) TXDir=+iPhysicalWalk;
236  C4Real x = cObj->fix_x, y = cObj->fix_y;
237  // find bottom-most vertex, correct starting position for simulation
238  int32_t iBtmVtx = cObj->Shape.GetBottomVertex();
239  if (iBtmVtx != -1) { x += cObj->Shape.GetVertexX(iBtmVtx); y += cObj->Shape.GetVertexY(iBtmVtx); }
240  // Try dive
241  if (cObj->Shape.ContactDensity > C4M_Liquid)
242  if (SimFlightHitsLiquid(x,y,TXDir,-iPhysicalJump))
243  if (ObjectActionDive(cObj,TXDir,-iPhysicalJump))
244  return true;
245  // Regular jump
246  return ObjectActionJump(cObj,TXDir,-iPhysicalJump,true);
247 }
248 
249 bool ObjectComLetGo(C4Object *cObj, int32_t xdirf)
250 { // by ACTSCALE, ACTHANGLE or ExecCMDFMoveTo
251  return ObjectActionJump(cObj,itofix(xdirf),Fix0,true);
252 }
253 
254 bool ObjectComDig(C4Object *cObj) // by DFA_WALK
255 {
256  if (!ObjectActionDig(cObj))
257  {
258  GameMsgObjectError(FormatString(LoadResStr("IDS_OBJ_NODIG"),cObj->GetName()).getData(),cObj);
259  return false;
260  }
261  return true;
262 }
263 
264 bool ObjectComPut(C4Object *cObj, C4Object *pTarget, C4Object *pThing)
265 {
266  // No object specified, first from contents
267  if (!pThing) pThing = cObj->Contents.GetObject();
268  // Nothing to put
269  if (!pThing) return false;
270  // No target
271  if (!pTarget) return false;
272  // Grabbing: check C4D_Grab_Put
273  if (pTarget!=cObj->Contained)
274  if (!(pTarget->Def->GrabPutGet & C4D_Grab_Put))
275  {
276  // No grab put: fail
277  return false;
278  }
279  // Target no fullcon
280  if (!(pTarget->OCF & OCF_FullCon)) return false;
281  // Transfer thing
282  bool fRejectCollect;
283  if (!pThing->Enter(pTarget, true, true, &fRejectCollect)) return false;
284  // Put call to object script
285  cObj->Call(PSF_Put);
286  // Target collection call
287  pTarget->Call(PSF_Collection,&C4AulParSet(pThing, true));
288  // Success
289  return true;
290 }
291 
292 bool ObjectComThrow(C4Object *cObj, C4Object *pThing)
293 {
294  // No object specified, first from contents
295  if (!pThing) pThing = cObj->Contents.GetObject();
296  // Nothing to throw
297  if (!pThing) return false;
298  // Throw com
299  switch (cObj->GetProcedure())
300  {
301  case DFA_WALK: return ObjectActionThrow(cObj,pThing);
302  }
303  // Failure
304  return false;
305 }
306 
307 bool ObjectComDrop(C4Object *cObj, C4Object *pThing)
308 {
309  // No object specified, first from contents
310  if (!pThing) pThing = cObj->Contents.GetObject();
311  // Nothing to throw
312  if (!pThing) return false;
313  // Force and direction
314  // When dropping diagonally, drop from edge of shape
315  // When doing a diagonal forward drop during flight, exit a bit closer to the Clonk to allow planned tumbling
316  // Except when hangling, so you can mine effectively form the ceiling, and when swimming because you cannot tumble then
318  int32_t tdir=0; int right=0;
319  bool isHanglingOrSwimming = false;
320  int32_t iProc = -1;
321  C4PropList* pActionDef = cObj->GetAction();
322  if (pActionDef)
323  {
324  iProc = pActionDef->GetPropertyP(P_Procedure);
325  if (iProc == DFA_HANGLE || iProc == DFA_SWIM) isHanglingOrSwimming = true;
326  }
327  int32_t iOutposReduction = 1; // don't exit object too far forward during jump
328  if (iProc != DFA_SCALE) // never diagonal during scaling (can have com into wall during scaling!)
329  {
330  if (ComDirLike(cObj->Action.ComDir, COMD_Left)) { tdir=-1; right = 0; if (cObj->xdir < C4REAL10(15) && !isHanglingOrSwimming) --iOutposReduction; }
331  if (ComDirLike(cObj->Action.ComDir, COMD_Right)) { tdir=+1; right = 1; if (cObj->xdir > C4REAL10(-15) && !isHanglingOrSwimming) --iOutposReduction; }
332  }
333  // Exit object
334  pThing->Exit(cObj->GetX() + (cObj->Shape.x + cObj->Shape.Wdt * right) * !!tdir * iOutposReduction,
335  cObj->GetY()+cObj->Shape.y+cObj->Shape.Hgt-(pThing->Shape.y+pThing->Shape.Hgt),0,pthrow*tdir,Fix0,Fix0);
336  // Update OCF
337  cObj->SetOCF();
338  // Ungrab
339  ObjectComUnGrab(cObj);
340  // Done
341  return true;
342 }
343 
344 bool ObjectComPutTake(C4Object *cObj, C4Object *pTarget, C4Object *pThing) // by C4CMD_Throw
345 { // by C4CMD_Drop
346  // Valid checks
347  if (!pTarget) return false;
348  // No object specified, first from contents
349  if (!pThing) pThing = cObj->Contents.GetObject();
350  // Has thing, put to target
351  if (pThing)
352  return ObjectComPut(cObj,pTarget,pThing);
353  // If target is own container, activate activation menu
354  if (pTarget==cObj->Contained)
355  return ObjectComTake(cObj); // carlo
356  // Assuming target is grabbed, check for grab get
357  if (pTarget->Def->GrabPutGet & C4D_Grab_Get)
358  {
359  // Activate get menu
360  return cObj->ActivateMenu(C4MN_Get,0,0,0,pTarget);
361  }
362  // Failure
363  return false;
364 }
365 
366 // carlo
367 bool ObjectComTake(C4Object *cObj) // by C4CMD_Take
368 {
369  return cObj->ActivateMenu(C4MN_Activate);
370 }
371 
372 // carlo
373 bool ObjectComTake2(C4Object *cObj) // by C4CMD_Take2
374 {
375  return cObj->ActivateMenu(C4MN_Get,0,0,0,cObj->Contained);
376 }
377 
378 bool ObjectComPunch(C4Object *cObj, C4Object *pTarget, int32_t punch)
379 {
380  if (!cObj || !pTarget) return false;
381  if (!punch) return true;
382  bool fBlowStopped = !!pTarget->Call(PSF_QueryCatchBlow,&C4AulParSet(cObj));
383  if (fBlowStopped && punch>1) punch=punch/2; // half damage for caught blow, so shield+armor help in fistfight and vs monsters
384  pTarget->DoEnergy(-punch, false, C4FxCall_EngGetPunched, cObj->Controller);
385  int32_t tdir=+1; if (cObj->Action.Dir==DIR_Left) tdir=-1;
386  pTarget->Action.ComDir=COMD_Stop;
387  // No tumbles when blow was caught
388  if (fBlowStopped) return false;
389  // Hard punch
390  if (punch>=10)
391  if (ObjectActionTumble(pTarget,pTarget->Action.Dir,C4REAL100(150)*tdir,itofix(-2)))
392  {
393  pTarget->Call(PSF_CatchBlow,&C4AulParSet(punch, cObj));
394  return true;
395  }
396 
397  // Regular punch
398  if (ObjectActionGetPunched(pTarget,C4REAL100(250)*tdir,Fix0))
399  {
400  pTarget->Call(PSF_CatchBlow,&C4AulParSet(punch, cObj));
401  return true;
402  }
403 
404  return false;
405 }
406 
408 {
409  if (cObj->GetProcedure()==DFA_ATTACH)
410  return cObj->SetAction(0);
411  return false;
412 }
413 
415 {
416  // Stand - but keep momentum to allow more dyanamic digging
417  C4Real o_xdir = cObj->xdir, o_ydir = cObj->ydir;
418  ObjectActionStand(cObj);
419  cObj->xdir = o_xdir; cObj->ydir = o_ydir;
420  // Clear digging command
421  if (cObj->Command)
422  if (cObj->Command->Command == C4CMD_Dig)
423  cObj->ClearCommand(cObj->Command);
424 }
425 
426 bool ComDirLike(int32_t iComDir, int32_t iSample)
427 {
428  if (iComDir == iSample) return true;
429  if (iComDir % 8 + 1 == iSample) return true;
430  if (iComDir == iSample % 8 + 1 ) return true;
431  return false;
432 }
433 
C4PropertyName GetPropertyP(C4PropertyName k) const
Definition: C4PropList.cpp:832
int32_t GetY() const
Definition: C4Object.h:287
bool ObjectComGrab(C4Object *cObj, C4Object *pTarget)
bool ObjectComUnGrab(C4Object *cObj)
#define COMD_UpRight
Definition: C4Object.h:52
bool Enter(C4Object *pTarget, bool fCalls=true, bool fCopyMotion=true, bool *pfRejectCollect=nullptr)
Definition: C4Object.cpp:1267
int32_t GetCon() const
Definition: C4Object.h:272
#define PSF_Grabbed
Definition: C4GameScript.h:53
uint32_t Random()
Definition: C4Random.cpp:43
bool ObjectActionKneel(C4Object *cObj)
Definition: C4ObjectCom.cpp:95
bool ObjectComCancelAttach(C4Object *cObj)
void SetDir(int32_t tdir)
Definition: C4Object.cpp:2847
#define PSF_CatchBlow
Definition: C4GameScript.h:72
C4PropList * GetAction() const
Definition: C4Object.cpp:2681
C4Command * Command
Definition: C4Object.h:166
int32_t ContactCheck(int32_t atx, int32_t aty, uint32_t *border_hack_contacts=0, bool collide_halfvehic=false)
Definition: C4Movement.cpp:137
int32_t ContactDensity
Definition: C4Shape.h:48
bool SetActionByName(C4String *ActName, C4Object *pTarget=nullptr, C4Object *pTarget2=nullptr, int32_t iCalls=SAC_StartCall|SAC_AbortCall, bool fForce=false)
Definition: C4Object.cpp:2821
bool ObjectComPutTake(C4Object *cObj, C4Object *pTarget, C4Object *pThing)
C4Real C4REAL100(int x)
Definition: C4Real.h:267
int32_t GetBottomVertex()
Definition: C4Shape.cpp:460
void GameMsgObjectError(const char *szText, C4Object *pTarget, bool Red)
void ClearCommand(C4Command *pUntil)
Definition: C4Object.cpp:2552
const int32_t C4D_Grab_Get
Definition: C4Def.h:65
const uint32_t OCF_FullCon
Definition: C4Constants.h:85
const char * LoadResStr(const char *id)
Definition: C4Language.h:83
int32_t GetVertexX(int32_t iVertex)
Definition: C4Shape.cpp:424
Definition: C4Real.h:58
bool Mobile
Definition: C4Object.h:128
const int32_t FullCon
Definition: C4Constants.h:182
bool ObjectComStop(C4Object *cObj)
bool ObjectComPut(C4Object *cObj, C4Object *pTarget, C4Object *pThing)
int32_t Wdt
Definition: C4Rect.h:32
bool ObjectActionWalk(C4Object *cObj)
Definition: C4ObjectCom.cpp:40
bool CloseMenu(bool fForce)
Definition: C4Object.cpp:1577
const int32_t C4D_Grab_Put
Definition: C4Def.h:64
C4NotifyingObjectList Contents
Definition: C4Object.h:152
C4Def * Def
Definition: C4Object.h:143
bool ObjectActionPush(C4Object *cObj, C4Object *target)
int32_t t_attach
Definition: C4Object.h:86
C4Real C4REAL10(int x)
Definition: C4Real.h:269
#define DIR_Left
Definition: C4Object.h:41
int32_t y
Definition: C4Rect.h:32
uint32_t t_contact
Definition: C4Object.h:133
bool ObjectComDrop(C4Object *cObj, C4Object *pThing)
bool ObjectComPunch(C4Object *cObj, C4Object *pTarget, int32_t punch)
#define PSF_OnActionJump
Definition: C4GameScript.h:140
virtual const char * GetName() const
Definition: C4PropList.cpp:626
int32_t Command
Definition: C4Command.h:81
bool ObjectComJump(C4Object *cObj)
bool SetAction(C4PropList *Act, C4Object *pTarget=nullptr, C4Object *pTarget2=nullptr, int32_t iCalls=SAC_StartCall|SAC_AbortCall, bool fForce=false)
Definition: C4Object.cpp:2688
bool Exit(int32_t iX=0, int32_t iY=0, int32_t iR=0, C4Real iXDir=Fix0, C4Real iYDir=Fix0, C4Real iRDir=Fix0, bool fCalls=true)
Definition: C4Object.cpp:1231
bool ComDirLike(int32_t iComDir, int32_t iSample)
int32_t GetX() const
Definition: C4Object.h:286
C4Fixed itofix(int32_t x)
Definition: C4Real.h:261
bool ObjectComThrow(C4Object *cObj, C4Object *pThing)
C4Object * GetObject(int Index=0) const
int32_t Status
Definition: C4PropList.h:170
#define PSF_Grab
Definition: C4GameScript.h:52
bool ObjectActionCornerScale(C4Object *cObj)
#define COMD_Right
Definition: C4Object.h:53
#define COMD_Stop
Definition: C4Object.h:50
bool ObjectActionStand(C4Object *cObj)
Definition: C4ObjectCom.cpp:46
int32_t x
Definition: C4Rect.h:32
C4ObjectPtr Target
Definition: C4Object.h:87
int32_t Data
Definition: C4Object.h:84
C4Real fix_x
Definition: C4Object.h:125
const BYTE CNAT_Top
Definition: C4Constants.h:112
bool ObjectActionThrow(C4Object *cObj, C4Object *pThing)
#define COMD_Left
Definition: C4Object.h:57
bool ObjectActionScale(C4Object *cObj, int32_t dir)
const BYTE CNAT_Right
Definition: C4Constants.h:111
int32_t Dir
Definition: C4Object.h:80
bool ObjectComTake(C4Object *cObj)
void ObjectComStopDig(C4Object *cObj)
#define C4FxCall_EngGetPunched
Definition: C4Effect.h:63
int32_t GetProcedure() const
Definition: C4Object.cpp:2867
bool ActivateMenu(int32_t iMenu, int32_t iMenuSelect=0, int32_t iMenuData=0, int32_t iMenuPosition=0, C4Object *pTarget=nullptr)
Definition: C4Object.cpp:1483
void DoEnergy(int32_t iChange, bool fExact, int32_t iCause, int32_t iCausedByPlr)
Definition: C4Object.cpp:1113
#define PSF_QueryCatchBlow
Definition: C4GameScript.h:73
int32_t GrabPutGet
Definition: C4Def.h:126
bool ObjectActionDig(C4Object *cObj)
#define PSF_Collection
Definition: C4GameScript.h:56
int32_t GetPropertyInt(C4PropertyName k, int32_t default_val=0) const
Definition: C4PropList.cpp:863
C4Real fix_y
Definition: C4Object.h:125
int32_t GetVertexY(int32_t iVertex)
Definition: C4Shape.cpp:430
void SetOCF()
Definition: C4Object.cpp:670
C4ObjectPtr Contained
Definition: C4Object.h:144
bool ObjectComDig(C4Object *cObj)
int32_t Hgt
Definition: C4Rect.h:32
bool ObjectActionFlat(C4Object *cObj, int32_t dir)
C4Action Action
Definition: C4Object.h:147
C4Shape Shape
Definition: C4Object.h:148
const int32_t C4M_Liquid
Definition: C4Constants.h:175
uint32_t OCF
Definition: C4Object.h:134
bool SimFlightHitsLiquid(C4Real fcx, C4Real fcy, C4Real xdir, C4Real ydir)
Definition: C4Movement.cpp:657
bool ObjectComTake2(C4Object *cObj)
bool ObjectActionDive(C4Object *cObj, C4Real xdir, C4Real ydir)
Definition: C4ObjectCom.cpp:69
bool ObjectActionHangle(C4Object *cObj)
C4Value Call(C4PropertyName k, C4AulParSet *pPars=0, bool fPassErrors=false)
Definition: C4PropList.h:112
bool ObjectActionTumble(C4Object *cObj, int32_t dir, C4Real xdir, C4Real ydir)
Definition: C4ObjectCom.cpp:80
int fixtoi(const C4Fixed &x)
Definition: C4Real.h:259
C4Real xdir
Definition: C4Object.h:126
int32_t Controller
Definition: C4Object.h:111
bool ObjectComLetGo(C4Object *cObj, int32_t xdirf)
#define PSF_Put
Definition: C4GameScript.h:55
const BYTE CNAT_Left
Definition: C4Constants.h:110
const BYTE CNAT_Bottom
Definition: C4Constants.h:113
C4Real ydir
Definition: C4Object.h:126
bool ObjectActionJump(C4Object *cObj, C4Real xdir, C4Real ydir, bool fByCom)
Definition: C4ObjectCom.cpp:53
bool ObjectActionGetPunched(C4Object *cObj, C4Real xdir, C4Real ydir)
Definition: C4ObjectCom.cpp:88
#define COMD_UpLeft
Definition: C4Object.h:58
int32_t ComDir
Definition: C4Object.h:82
const C4Real Fix0
Definition: C4Real.h:312
StdStrBuf FormatString(const char *szFmt,...)
Definition: StdBuf.cpp:277