Skip to content

Commit

Permalink
- moved a large part of the VM thunks out of p_mobj.cpp.
Browse files Browse the repository at this point in the history
  • Loading branch information
coelckers committed Dec 4, 2018
1 parent a3265c2 commit 33db579
Show file tree
Hide file tree
Showing 7 changed files with 662 additions and 624 deletions.
1 change: 1 addition & 0 deletions src/CMakeLists.txt
Expand Up @@ -1152,6 +1152,7 @@ set (PCH_SOURCES
scripting/symbols.cpp
scripting/vmiterators.cpp
scripting/vmthunks.cpp
scripting/vmthunks_actors.cpp
scripting/types.cpp
scripting/thingdef.cpp
scripting/thingdef_data.cpp
Expand Down
5 changes: 0 additions & 5 deletions src/actor.h
Expand Up @@ -1010,11 +1010,6 @@ class AActor : public DThinker
void AttachLight(unsigned int count, const FLightDefaults *lightdef);
void SetDynamicLights();

// When was this actor spawned? (relative to the current level)
int GetLevelSpawnTime() const;
// How many ticks passed since this actor was spawned?
int GetAge() const;

// info for drawing
// NOTE: The first member variable *must* be snext.
AActor *snext, **sprev; // links in sector (if needed)
Expand Down
9 changes: 9 additions & 0 deletions src/actorinlines.h
Expand Up @@ -54,3 +54,12 @@ inline double sector_t::LowestFloorAt(AActor *a, sector_t **resultsec)
return ::LowestFloorAt(this, a->X(), a->Y(), resultsec);
}

inline double AActor::GetBobOffset(double ticfrac) const
{
if (!(flags2 & MF2_FLOATBOB))
{
return 0;
}
return BobSin(FloatBobPhase + level.maptime + ticfrac) * FloatBobStrength;
}

0 comments on commit 33db579

Please sign in to comment.