Skip to content

Commit

Permalink
libcommon: Cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
danij-deng committed Mar 6, 2015
1 parent f86f128 commit 1cd4cfe
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 14 deletions.
20 changes: 10 additions & 10 deletions doomsday/plugins/common/include/mobj.h
Expand Up @@ -154,6 +154,13 @@ dd_bool P_MobjChangeState(mobj_t *mob, statenum_t stateNum);
*/
dd_bool P_MobjChangeStateNoAction(mobj_t *mob, statenum_t stateNum);

/**
* Check whether the mobj is currently obstructed and explode immediately if so.
*
* @return Pointer to @em this mobj iff it survived, otherwise @c nullptr.
*/
mobj_t *Mobj_ExplodeIfObstructed(mobj_t *mob);

/**
* Launch the given map-object @a missile (if any) at the specified @a angle.
*
Expand All @@ -166,20 +173,13 @@ dd_bool P_MobjChangeStateNoAction(mobj_t *mob, statenum_t stateNum);
*/
mobj_t *P_LaunchMissile(mobj_t *missile, angle_t angle, coord_t const targetPos[3], coord_t extraMomZ);

/**
* Check whether the mobj is currently obstructed and explode immediately if so.
*
* @return Pointer to @em this mobj iff it survived, otherwise @c nullptr.
*/
mobj_t *Mobj_ExplodeIfObstructed(mobj_t *mob);

/**
* Launch the given map-object @a missile (if any) at the specified @a angle,
* enqueuing a new launch sound and recording @em this map-object as the source.
*
* @param mob Map-object hurler of @a missile.
* @param angle World space angle at which to launch.
* @param missile Map-object to be launched.
* @param angle World space angle at which to launch.
* @param targetPos World space point being targeted (for determining speed).
* @param extraMomZ Additional momentum to apply to the missile.
*
Expand All @@ -195,8 +195,8 @@ mobj_t *Mobj_LaunchMissileAtAngle (mobj_t *mob, mobj_t *missile, angle_t angle,
* @a missile is presently facing.
*
* @param mob Map-object hurler of @a missile.
* @param missile Map-object to be hurdled.
* @param targetPos World space point being launchd at (for determining speed).
* @param missile Map-object to be launched.
* @param targetPos World space point being targeted (for determining speed).
* @param extraMomZ Additional momentum to apply to the missile.
*
* @return Same as @a missile, for caller convenience.
Expand Down
10 changes: 6 additions & 4 deletions doomsday/plugins/common/src/mobj.cpp
Expand Up @@ -229,10 +229,10 @@ dd_bool Mobj_IsPlayerClMobj(mobj_t *mo)
return false;
}

dd_bool Mobj_IsPlayer(mobj_t const *mo)
dd_bool Mobj_IsPlayer(mobj_t const *mob)
{
if(!mo) return false;
return (mo->player != 0);
if(!mob) return false;
return (mob->player != 0);
}

angle_t Mobj_AimAtPoint2(mobj_t *mob, coord_t const point[], dd_bool pointShadowed)
Expand Down Expand Up @@ -954,9 +954,11 @@ mobj_t *Mobj_ExplodeIfObstructed(mobj_t *mob)
mobj_t *P_LaunchMissile(mobj_t *missile, angle_t angle, coord_t const targetPos[],
coord_t extraMomZ)
{
DENG_ASSERT(targetPos);
DENG2_ASSERT(targetPos);
if(missile)
{
DENG2_ASSERT(missile->info);

// Play the launch sound.
if(missile->info->seeSound)
{
Expand Down

0 comments on commit 1cd4cfe

Please sign in to comment.