User:Monster Iestyn/Source Code Documentation/p_slopes.h

From SRB2 Wiki
Jump to navigation Jump to search
Online link GitHub entry
File type C header file
#include guard P_SLOPES_H__

This header file contains prototypes for various setup and utility functions for slopes and slope physics.

Function name Return type Params Defined in Description
P_CalculateSlopeNormal void pslope_t *slope p_slopes.c Recalculates the normal of the slope.
P_ResetDynamicSlopes void none p_slopes.c Resets the slopes list, handles spawning the current map's slopes. Called by P_SetupLevel.
P_RunDynamicSlopes void none p_slopes.c Recalculates the z-delta and angle of dynamic slopes if needed. Called each tic by P_UpdateSpecials.
P_SpawnSlope_Line void int linenum p_slopes.c Creates one or more slopes based on the given linedef type and front/back sectors.
P_CopySectorSlope void line_t *line p_slopes.c Searches through the linedef's tagged sectors and copies the first found slope (for floor and/or ceiling, depending on the linedef special) to the linedef's front sector.
P_SlopeById pslope_t * UINT16 id p_slopes.c Looks in the slope list for a slope with a specified ID. Mostly useful for netgame synchronisation.
P_GetZAt fixed_t pslope_t *slope,
fixed_t x,
fixed_t y
p_slopes.c Returns the height of the sloped plane at (x, y) as a fixed_t integer.
P_QuantizeMomentumToSlope void vector3_t *momentum,
pslope_t *slope
p_slopes.c When given a vector, rotates it and aligns it to a slope.
P_ReverseQuantizeMomentumToSlope void vector3_t *momentum,
pslope_t *slope
p_slopes.c When given a vector, rotates it and aligns it to a flat surface (from being relative to a given slope).
P_SlopeLaunch void mobj_t *mo p_slopes.c Handles slope ejection for objects.
P_HandleSlopeLanding void mobj_t *thing,
pslope_t *slope
p_slopes.c Function to help handle landing on slopes.
P_ButteredSlope void mobj_t *mo p_slopes.c Handles sliding down slopes.