61 void C4Object::UpdateInMat()
113 fling_xdir +=
xdir / 2;
114 fling_ydir +=
ydir / 2;
144 dforce = dforce * 100 /
Mass;
149 if (
Abs(
xdir - txdir) <= dforce)
217 dforce = dforce * 100 /
Mass;
314 while (new_rotation < 0)
320 RemoveSolidMask(
false);
335 void C4Object::RemoveSolidMask(
bool fBackupAttachment)
383 int32_t y_solid_left = 0;
384 int32_t y_solid_right = 0;
390 while (--y_solid_left > -range_y)
402 while (++y_solid_left < range_y)
412 check_x += 2 * range_x;
416 while (--y_solid_right > -range_y)
428 while (++y_solid_right < range_y)
439 dest_angle = (y_solid_right - y_solid_left) * (35 / std::max<int32_t>(range_x, 1));
456 if (
Abs(dest_angle -
GetR()) > 2)
459 rdir /= (10000 / speed);
469 static void BubbleOut(int32_t tx, int32_t ty)
485 void C4Object::Splash()
488 int32_t ty =
GetY() + 1;
503 while (
GBackLiquid(tx, sy) && sy > ty - 20 && sy >= 0)
508 for (int32_t cnt = 0; cnt < amt; cnt++)
510 int32_t bubble_x = tx +
Random(16) - 8;
511 int32_t bubble_y = ty +
Random(16) - 6;
512 BubbleOut(bubble_x, bubble_y);
const uint32_t OCF_HitSpeed2
const int32_t C4D_StaticBack
void GameMsgObjectError(const char *szText, C4Object *pTarget, bool Red)
#define PSF_OnMaterialChanged
bool GBackLiquid(int32_t x, int32_t y)
bool GBackSemiSolid(int32_t x, int32_t y)
int32_t GBackMat(int32_t x, int32_t y)
bool DensityLiquid(int32_t dens)
bool GBackSolid(int32_t x, int32_t y)
const char * LoadResStr(const char *id)
C4MaterialMap MaterialMap
bool MatValid(int32_t mat)
bool ObjectActionJump(C4Object *cObj, C4Real xdir, C4Real ydir, bool fByCom)
bool ObjectActionTumble(C4Object *cObj, int32_t dir, C4Real xdir, C4Real ydir)
C4Fixed itofix(int32_t x)
C4SoundInstance * StartSoundEffect(const char *szSndName, bool fLoop, int32_t iVolume, C4Object *pObj, int32_t iCustomFalloffDistance, int32_t iPitch, C4SoundModifier *modifier)
StdStrBuf FormatString(const char *szFmt,...)
int32_t NoMassFromContents
C4Object * CreateObject(C4PropList *type, C4Object *creator, int32_t owner=NO_OWNER, int32_t x=50, int32_t y=50, int32_t r=0, bool grow_from_center=false, C4Real xdir=Fix0, C4Real ydir=Fix0, C4Real rdir=Fix0, int32_t controller=NO_OWNER)
void UpdatePos(C4Object *game_object)
int32_t ExtractMaterial(int32_t fx, int32_t fy, bool distant_first)
void UpdateSolidMask(bool fRestoreAttachedObjects)
bool At(int32_t ctx, int32_t cty) const
void GetOCFForPos(int32_t ctx, int32_t cty, DWORD &ocf) const
int32_t ContactCheck(int32_t at_x, int32_t at_y, uint32_t *border_hack_contacts=nullptr, bool collide_halfvehic=false)
void SetHalfVehicleSolidMask(bool set)
bool HalfVehicleSolidMask
void UpdateFace(bool bUpdateShape, bool fTemp=false)
bool AdjustWalkRotation(int32_t iRangeX, int32_t iRangeY, int32_t iSpeed)
bool IsMoveableBySolidMask(int ComparisonPlane) const
int32_t GetSolidMaskPlane() const
bool IsInLiquidCheck() const
void SetDir(int32_t tdir)
void Fling(C4Real txdir, C4Real tydir, bool fAddSpeed)
bool Push(C4Real txdir, C4Real dforce, bool fStraighten)
C4SolidMask * pSolidMaskData
bool Lift(C4Real tydir, C4Real dforce)
void DrawSolidMask(C4TargetFacet &cgo) const
C4NotifyingObjectList Contents
bool CheckSolidMaskRect()
void SetSolidMask(int32_t iX, int32_t iY, int32_t iWdt, int32_t iHgt, int32_t iTX, int32_t iTY)
void SetRotation(int32_t nr)
BYTE GetMomentum(C4Real &rxdir, C4Real &rydir) const
int ObjectCount(C4ID id=C4ID::None) const
bool Create(int32_t mat, C4Real ix, C4Real iy, C4Real ixdir=Fix0, C4Real iydir=Fix0)
int32_t GetPropertyInt(C4PropertyName k, int32_t default_val=0) const
virtual const char * GetName() const
C4Value Call(C4PropertyName k, C4AulParSet *pPars=nullptr, bool fPassErrors=false)
int32_t VtxX[C4D_MaxVertex]
void Draw(C4TargetFacet &cgo)
void Put(bool fCauseInstability, C4TargetRect *pClipRect, bool fRestoreAttachment)
void Remove(bool fBackupAttachment)
void SetHalfVehicle(bool set)
void Set(int32_t iX, int32_t iY, int32_t iWdt, int32_t iHgt, int32_t iTX, int32_t iTY)