2020-06-24 19:21:02 +00:00
|
|
|
#pragma once
|
|
|
|
|
2020-07-06 20:23:18 +00:00
|
|
|
#include "screenjob.h"
|
2020-07-06 16:08:31 +00:00
|
|
|
#include "constants.h"
|
2020-08-26 15:12:48 +00:00
|
|
|
#include "packet.h"
|
2020-10-21 17:14:41 +00:00
|
|
|
#include "types.h"
|
2022-12-04 12:09:47 +00:00
|
|
|
#include "g_mapinfo.h"
|
2020-07-06 20:23:18 +00:00
|
|
|
|
2020-07-07 20:41:31 +00:00
|
|
|
struct MapRecord;
|
|
|
|
|
2020-07-06 20:23:18 +00:00
|
|
|
BEGIN_DUKE_NS
|
|
|
|
|
2020-10-21 17:14:41 +00:00
|
|
|
|
|
|
|
|
2020-07-06 20:23:18 +00:00
|
|
|
// dumping ground for all external function prototypes to keep them out of the important headers.
|
2020-07-07 07:39:33 +00:00
|
|
|
// This list is not sorted in any way.
|
|
|
|
|
2022-12-10 16:52:25 +00:00
|
|
|
void animatewalls(void);
|
2020-07-07 07:39:33 +00:00
|
|
|
void lava_cleararrays();
|
2021-11-18 18:44:26 +00:00
|
|
|
void addjaildoor(int p1, int p2, int iht, int jlt, int p3, sectortype* h);
|
|
|
|
void addminecart(int p1, int p2, sectortype* i, int iht, int p3, sectortype* childsectnum);
|
2022-11-20 12:57:51 +00:00
|
|
|
void addtorch(sectortype* sect, int shade, int lotag);
|
|
|
|
void addlightning(sectortype* sect, int shade);
|
|
|
|
int addambient(int hitag, int lotag);
|
2020-07-06 20:23:18 +00:00
|
|
|
|
2022-11-25 16:43:13 +00:00
|
|
|
bool ceilingspace(sectortype* sectp);
|
|
|
|
bool floorspace(sectortype* sectp);
|
|
|
|
|
2020-06-24 19:21:02 +00:00
|
|
|
void movecyclers(void);
|
|
|
|
void movedummyplayers(void);
|
|
|
|
void resetlanepics(void);
|
|
|
|
void moveplayers();
|
2022-12-14 16:12:36 +00:00
|
|
|
void movefallers();
|
2020-06-24 19:21:02 +00:00
|
|
|
void doanimations();
|
2022-12-30 15:21:09 +00:00
|
|
|
void checkdive(DDukeActor* transporter, DDukeActor* transported);
|
2022-12-03 16:24:41 +00:00
|
|
|
void tickstat(int stat, bool deleteinvalid = false);
|
2022-11-20 10:58:19 +00:00
|
|
|
void operaterespawns(int low);
|
2022-09-08 11:16:27 +00:00
|
|
|
void moveclouds(double interpfrac);
|
2022-01-02 14:44:52 +00:00
|
|
|
void movefta();
|
2020-06-24 19:21:02 +00:00
|
|
|
|
2022-01-21 00:04:08 +00:00
|
|
|
void clearcameras(player_struct* p);
|
2020-10-21 17:14:41 +00:00
|
|
|
void RANDOMSCRAP(DDukeActor* i);
|
2022-12-12 08:25:41 +00:00
|
|
|
void detonate(DDukeActor* i, PClassActor* explosion);
|
2022-12-29 15:59:07 +00:00
|
|
|
void hitradius(DDukeActor* i, int r, int hp1, int hp2, int hp3, int hp4);
|
2022-12-29 18:17:49 +00:00
|
|
|
int movesprite_ex(DDukeActor* actor, const DVector3& change, unsigned int cliptype, Collision& result);
|
2022-12-30 11:38:36 +00:00
|
|
|
void move(DDukeActor* actor, int pnum, double xvel);
|
2022-12-12 18:39:17 +00:00
|
|
|
void lotsofstuff(DDukeActor* s, int n, PClassActor* spawntype);
|
2020-10-21 21:11:06 +00:00
|
|
|
void watersplash2(DDukeActor* i);
|
|
|
|
bool money(DDukeActor* i, int BLOODPOOL);
|
2022-01-26 23:41:33 +00:00
|
|
|
bool bloodpool(DDukeActor* i, bool puke);
|
2020-10-21 21:18:24 +00:00
|
|
|
void shell(DDukeActor* i, bool morecheck);
|
|
|
|
void glasspieces(DDukeActor* i);
|
2022-11-22 22:21:45 +00:00
|
|
|
void spawnguts(DDukeActor* origin, PClass* type, int count);
|
2020-06-24 19:21:02 +00:00
|
|
|
|
2022-01-19 09:48:18 +00:00
|
|
|
void handle_se00(DDukeActor* i);
|
2020-10-21 21:39:12 +00:00
|
|
|
void handle_se01(DDukeActor* i);
|
2022-12-28 23:51:26 +00:00
|
|
|
void handle_se14(DDukeActor* i, bool checkstat, PClassActor* RPG);
|
|
|
|
void handle_se30(DDukeActor* i);
|
2020-10-21 22:10:43 +00:00
|
|
|
void handle_se02(DDukeActor* i);
|
|
|
|
void handle_se03(DDukeActor* i);
|
|
|
|
void handle_se04(DDukeActor* i);
|
2022-11-29 14:12:35 +00:00
|
|
|
void handle_se05(DDukeActor* i);
|
2020-10-21 22:14:54 +00:00
|
|
|
void handle_se08(DDukeActor* i, bool checkhitag1);
|
|
|
|
void handle_se10(DDukeActor* i, const int *);
|
2020-10-21 22:20:47 +00:00
|
|
|
void handle_se11(DDukeActor* i);
|
|
|
|
void handle_se12(DDukeActor* i, int planeonly = 0);
|
|
|
|
void handle_se13(DDukeActor* i);
|
2020-10-21 22:25:11 +00:00
|
|
|
void handle_se15(DDukeActor* i);
|
2022-12-02 22:26:55 +00:00
|
|
|
void handle_se16(DDukeActor* i);
|
2020-10-21 22:25:11 +00:00
|
|
|
void handle_se17(DDukeActor* i);
|
2020-10-21 22:30:22 +00:00
|
|
|
void handle_se18(DDukeActor* i, bool morecheck);
|
2022-12-09 23:56:40 +00:00
|
|
|
void handle_se19(DDukeActor* i);
|
2020-10-21 22:35:30 +00:00
|
|
|
void handle_se20(DDukeActor* i);
|
|
|
|
void handle_se21(DDukeActor* i);
|
|
|
|
void handle_se22(DDukeActor* i);
|
2022-09-12 19:59:34 +00:00
|
|
|
void handle_se24(DDukeActor* actor, bool scroll, double shift);
|
2022-09-12 21:35:48 +00:00
|
|
|
void handle_se25(DDukeActor* a, int snd1, int snd2);
|
2020-10-21 22:35:30 +00:00
|
|
|
void handle_se26(DDukeActor* i);
|
2020-10-21 22:40:57 +00:00
|
|
|
void handle_se27(DDukeActor* i);
|
2022-09-11 21:51:48 +00:00
|
|
|
void handle_se29(DDukeActor* actor);
|
2020-10-21 23:04:13 +00:00
|
|
|
void handle_se31(DDukeActor* a, bool choosedir);
|
2020-10-21 22:40:57 +00:00
|
|
|
void handle_se32(DDukeActor* i);
|
2022-12-12 18:39:17 +00:00
|
|
|
void handle_se35(DDukeActor* i);
|
2022-12-29 09:56:10 +00:00
|
|
|
void handle_se36(DDukeActor* i);
|
2020-10-21 22:40:57 +00:00
|
|
|
void handle_se128(DDukeActor* i);
|
2022-12-12 18:39:17 +00:00
|
|
|
void handle_se130(DDukeActor* i, int countmax);
|
2020-06-24 19:21:02 +00:00
|
|
|
|
2020-10-21 23:12:16 +00:00
|
|
|
int dodge(DDukeActor*);
|
2020-10-22 14:40:48 +00:00
|
|
|
void alterang(int ang, DDukeActor* actor, int g_p);
|
2022-12-29 22:03:29 +00:00
|
|
|
void fall_common(DDukeActor* actor, int g_p, int(*fallspecial)(DDukeActor*, int));
|
2022-02-07 10:04:19 +00:00
|
|
|
void checkavailweapon(player_struct* p);
|
|
|
|
void addammo(int weapon, player_struct* p, int amount);
|
2020-06-24 19:21:02 +00:00
|
|
|
|
2020-10-21 17:38:53 +00:00
|
|
|
int ssp(DDukeActor* i, unsigned int cliptype); //The set sprite function
|
2020-10-24 07:40:10 +00:00
|
|
|
void insertspriteq(DDukeActor *i);
|
2020-10-22 17:27:59 +00:00
|
|
|
int wakeup(DDukeActor* sn, int pn);
|
2020-07-06 20:23:18 +00:00
|
|
|
|
|
|
|
|
|
|
|
int timedexit(int snum);
|
2022-11-30 13:29:34 +00:00
|
|
|
void dokneeattack(int snum);
|
2020-07-06 20:23:18 +00:00
|
|
|
int endoflevel(int snum);
|
2022-09-14 19:25:27 +00:00
|
|
|
void playerisdead(int snum, int psectlotag, double fz, double cz);
|
2020-07-06 20:23:18 +00:00
|
|
|
void footprints(int snum);
|
|
|
|
int makepainsounds(int snum, int type);
|
|
|
|
void playerCrouch(int snum);
|
2022-09-14 20:04:41 +00:00
|
|
|
void playerJump(int snum, double fz, double cz);
|
2020-11-29 08:00:00 +00:00
|
|
|
|
2020-08-29 11:32:14 +00:00
|
|
|
void checklook(int snum, ESyncBits actions);
|
2020-07-06 20:23:18 +00:00
|
|
|
void playerCenterView(int snum);
|
2020-08-29 11:32:14 +00:00
|
|
|
void playerLookUp(int snum, ESyncBits actions);
|
|
|
|
void playerLookDown(int snum, ESyncBits actions);
|
|
|
|
void playerAimUp(int snum, ESyncBits actions);
|
|
|
|
void playerAimDown(int snum, ESyncBits actions);
|
2022-12-23 07:55:13 +00:00
|
|
|
DDukeActor* aim(DDukeActor* s, int aang, bool force = true);
|
2023-04-16 12:38:02 +00:00
|
|
|
DDukeActor* aim_(DDukeActor* actor, DDukeActor* weapon, double aimangle);
|
2022-12-29 09:56:10 +00:00
|
|
|
void shoot(DDukeActor* actor, PClass* cls);
|
2022-02-07 10:04:19 +00:00
|
|
|
void checkweapons(player_struct* const p);
|
2022-09-12 16:26:27 +00:00
|
|
|
int findotherplayer(int p, double* d);
|
2022-02-07 10:04:19 +00:00
|
|
|
void quickkill(player_struct* p);
|
|
|
|
int setpal(player_struct* p);
|
2020-07-06 20:23:18 +00:00
|
|
|
int madenoise(int playerNum);
|
2021-11-18 18:57:14 +00:00
|
|
|
int haskey(sectortype* sect, int snum);
|
2022-12-08 20:58:05 +00:00
|
|
|
void purplelavacheck(player_struct* p);
|
2022-12-28 21:46:13 +00:00
|
|
|
void addphealth(player_struct* p, int amount, bool bigitem);
|
|
|
|
int playereat(player_struct* p, int amount, bool bigitem);
|
2022-12-15 14:18:46 +00:00
|
|
|
void playerdrink(player_struct* p, int amount);
|
2022-12-28 21:46:13 +00:00
|
|
|
int playeraddammo(player_struct* p, int weaponindex, int amount);
|
|
|
|
int playeraddweapon(player_struct* p, int weaponindex, int amount);
|
2022-12-15 20:12:20 +00:00
|
|
|
void playeraddinventory(player_struct* p, DDukeActor* item, int type, int amount);
|
|
|
|
void actorsizeto(DDukeActor* actor, double x, double y);
|
|
|
|
void spawndebris(DDukeActor* g_ac, int dnum, int count);
|
2022-12-28 21:46:13 +00:00
|
|
|
int checkp(DDukeActor* self, player_struct* p, int flags);
|
|
|
|
int playercheckinventory(player_struct* p, DDukeActor* item, int type, int amount);
|
2022-12-15 20:12:20 +00:00
|
|
|
void playerstomp(player_struct* p, DDukeActor* stomped);
|
|
|
|
void playerreset(player_struct* p, DDukeActor* g_ac);
|
|
|
|
void wackplayer(player_struct* p);
|
|
|
|
void actoroperate(DDukeActor* g_ac);
|
|
|
|
void playerkick(player_struct* p, DDukeActor* g_ac);
|
|
|
|
void garybanjo(DDukeActor* g_ac);
|
2022-12-28 21:46:13 +00:00
|
|
|
int ifsquished(DDukeActor* i, int p);
|
|
|
|
void fakebubbaspawn(DDukeActor* actor, player_struct* p);
|
2022-12-15 20:12:20 +00:00
|
|
|
void tearitup(sectortype* sect);
|
|
|
|
void destroyit(DDukeActor* actor);
|
|
|
|
void mamaspawn(DDukeActor* actor);
|
|
|
|
void forceplayerangle(player_struct* snum);
|
|
|
|
|
2020-07-06 20:23:18 +00:00
|
|
|
|
2022-12-05 14:29:45 +00:00
|
|
|
bool checkhitceiling(sectortype* sectp);
|
2022-12-05 10:27:25 +00:00
|
|
|
void checkhitwall(DDukeActor* spr, walltype* wal, const DVector3& pos);
|
2022-01-09 22:03:11 +00:00
|
|
|
int callsound(sectortype* sectnum,DDukeActor* snum, bool endstate = false);
|
2022-09-13 22:11:16 +00:00
|
|
|
double hitasprite(DDukeActor* snum,DDukeActor **hitSprite);
|
2022-09-12 16:26:27 +00:00
|
|
|
int findplayer(const DDukeActor* s, double* dist);
|
|
|
|
|
2020-07-06 20:23:18 +00:00
|
|
|
void operatejaildoors(int hitag);
|
|
|
|
void allignwarpelevators(void);
|
|
|
|
bool isablockdoor(int tileNum);
|
2020-10-23 15:46:46 +00:00
|
|
|
bool activatewarpelevators(DDukeActor* s, int w);
|
2020-07-06 20:23:18 +00:00
|
|
|
int check_activator_motion(int lotag);
|
2022-11-19 14:40:35 +00:00
|
|
|
void operateactivators(int l, player_struct* w);
|
2022-12-10 16:52:25 +00:00
|
|
|
void operateforcefields(DDukeActor* s, int low);
|
2020-07-06 20:23:18 +00:00
|
|
|
void operatemasterswitches(int lotag);
|
2021-11-18 17:51:19 +00:00
|
|
|
void operatesectors(sectortype* s, DDukeActor* i);
|
2020-07-06 20:23:18 +00:00
|
|
|
void hud_input(int playerNum);
|
2022-09-12 17:47:07 +00:00
|
|
|
int getanimationindex(int animtype, sectortype* animindex);
|
2020-07-06 20:23:18 +00:00
|
|
|
bool isanearoperator(int lotag);
|
|
|
|
bool isanunderoperator(int lotag);
|
2022-09-12 17:47:07 +00:00
|
|
|
int setanimation(sectortype* animsect, int animtype, walltype* animtarget, double thegoal, double thevel);
|
|
|
|
int setanimation(sectortype* animsect, int animtype, sectortype* animtarget, double thegoal, double thevel);
|
2021-11-17 23:42:52 +00:00
|
|
|
void dofurniture(walltype* wallNum, sectortype* sectnum, int playerNum);
|
2020-07-06 20:23:18 +00:00
|
|
|
void dotorch();
|
2022-09-13 22:15:45 +00:00
|
|
|
double hitawall(player_struct* pl, walltype** hitWall);
|
2022-09-13 22:05:32 +00:00
|
|
|
double hits(DDukeActor* snum);
|
2020-07-06 20:23:18 +00:00
|
|
|
|
2021-11-18 19:51:09 +00:00
|
|
|
DDukeActor* LocateTheLocator(int n, sectortype* sectnum);
|
2020-07-06 20:23:18 +00:00
|
|
|
void clearcamera(player_struct* ps);
|
|
|
|
|
2020-10-23 18:27:05 +00:00
|
|
|
void LoadActor(DDukeActor* i, int p, int x);
|
2022-12-03 16:09:40 +00:00
|
|
|
bool execute(DDukeActor* s, int p, double d);
|
2020-10-21 23:11:38 +00:00
|
|
|
void makeitfall(DDukeActor* s);
|
2022-09-12 20:37:08 +00:00
|
|
|
DAngle furthestangle(DDukeActor* snum, int angDiv);
|
2020-10-21 23:10:56 +00:00
|
|
|
void getglobalz(DDukeActor* s);
|
2020-11-01 16:57:40 +00:00
|
|
|
void OnEvent(int id, int pnum = -1, DDukeActor* snum = nullptr, int dist = -1);
|
2022-11-24 06:42:17 +00:00
|
|
|
void setFromSpawnRec(DDukeActor* act, SpawnRec* info);
|
2020-07-06 15:30:23 +00:00
|
|
|
|
2022-10-07 16:51:29 +00:00
|
|
|
DDukeActor* CreateActor(sectortype* whatsectp, const DVector3& pos, int s_pn, int8_t s_shd, const DVector2& scale, DAngle s_ang, double s_vel, double s_zvel, DDukeActor* s_ow, int8_t s_stat);
|
2022-11-14 22:55:46 +00:00
|
|
|
DDukeActor* CreateActor(sectortype* whatsectp, const DVector3& pos, PClassActor* cls, int8_t s_shd, const DVector2& scale, DAngle s_ang, double s_vel, double s_zvel, DDukeActor* s_ow, int8_t s_stat);
|
2022-11-15 09:17:23 +00:00
|
|
|
DDukeActor* SpawnActor(sectortype* whatsectp, const DVector3& pos, PClassActor* cls, int8_t s_shd, const DVector2& scale, DAngle s_ang, double s_vel, double s_zvel, DDukeActor* s_ow, int8_t s_stat = -1);
|
2022-10-07 16:51:29 +00:00
|
|
|
|
2021-11-18 16:55:08 +00:00
|
|
|
void ceilingglass(DDukeActor* snum, sectortype* sectnum, int cnt);
|
2020-10-25 05:40:05 +00:00
|
|
|
void spriteglass(DDukeActor* snum, int cnt);
|
2021-11-17 23:38:20 +00:00
|
|
|
void lotsofcolourglass(DDukeActor* snum, walltype* wallNum, int cnt);
|
2022-11-15 11:21:21 +00:00
|
|
|
void lotsofglass(DDukeActor* snum, walltype* wal, int cnt);
|
2022-02-07 10:04:19 +00:00
|
|
|
void checkplayerhurt_d(player_struct* p, const Collision& coll);
|
|
|
|
void checkplayerhurt_r(player_struct* p, const Collision& coll);
|
2021-11-19 09:41:50 +00:00
|
|
|
DDukeActor* dospawnsprite(DDukeActor* actj, int pn);
|
|
|
|
|
2022-12-15 09:46:41 +00:00
|
|
|
void spriteinit(DDukeActor*, TArray<DDukeActor*>& actors);
|
|
|
|
DDukeActor* spawninit(DDukeActor* actj, DDukeActor* act, TArray<DDukeActor*>* actors);
|
2020-07-06 16:08:31 +00:00
|
|
|
|
2020-10-22 16:51:20 +00:00
|
|
|
void addspritetodelete(int spnum=0);
|
2022-02-07 10:04:19 +00:00
|
|
|
void checkavailinven(player_struct* p);
|
2022-01-19 08:41:48 +00:00
|
|
|
bool initspriteforspawn(DDukeActor* spn);
|
2020-11-02 20:37:37 +00:00
|
|
|
void initshell(DDukeActor* actj, DDukeActor* acti, bool isshell);
|
2021-12-04 12:02:38 +00:00
|
|
|
void spawneffector(DDukeActor* actor, TArray<DDukeActor*>* actors);
|
2020-07-15 16:10:31 +00:00
|
|
|
int startrts(int lumpNum, int localPlayer);
|
2020-07-06 16:08:31 +00:00
|
|
|
|
2020-07-06 19:10:20 +00:00
|
|
|
void pickrandomspot(int pn);
|
2022-07-25 22:12:57 +00:00
|
|
|
void premapcontroller(DDukeActor* ac);
|
2022-12-15 20:12:20 +00:00
|
|
|
void resetinventory(player_struct* pn);
|
2020-07-06 19:10:20 +00:00
|
|
|
void resetplayerstats(int pn);
|
2022-12-15 20:12:20 +00:00
|
|
|
void resetweapons(player_struct* pn);
|
2020-07-06 19:10:20 +00:00
|
|
|
void resetprestat(int snum, int g);
|
|
|
|
void prelevel_common(int g);
|
2020-07-07 11:19:09 +00:00
|
|
|
void cacheit_d();
|
|
|
|
void cacheit_r();
|
2020-07-06 19:10:20 +00:00
|
|
|
|
2022-02-07 10:04:19 +00:00
|
|
|
void FTA(int q, player_struct* p);
|
2022-12-03 17:43:15 +00:00
|
|
|
void OnMotorcycle(player_struct *pl);
|
2020-07-06 21:33:33 +00:00
|
|
|
void OffMotorcycle(player_struct *pl);
|
2022-12-03 17:43:15 +00:00
|
|
|
void OnBoat(player_struct *pl);
|
2020-07-06 21:33:33 +00:00
|
|
|
void OffBoat(player_struct *pl);
|
|
|
|
|
2020-11-02 23:20:51 +00:00
|
|
|
void cameratext(DDukeActor* i);
|
2020-07-19 09:57:00 +00:00
|
|
|
void dobonus(int bonusonly, const CompletionFunc& completion);
|
2020-07-07 02:54:12 +00:00
|
|
|
|
2022-09-07 05:34:55 +00:00
|
|
|
void drawweapon(double interpfrac);
|
2022-09-07 05:49:17 +00:00
|
|
|
void drawoverlays(double interpfrac);
|
2020-07-07 02:54:12 +00:00
|
|
|
void drawbackground(void);
|
2022-09-08 11:16:27 +00:00
|
|
|
void displayrooms(int32_t playerNum, double interpfrac, bool sceneonly);
|
2020-07-07 02:54:12 +00:00
|
|
|
void setgamepalette(int palid);
|
2020-07-07 11:19:09 +00:00
|
|
|
void resetmys();
|
2020-07-07 15:56:20 +00:00
|
|
|
void resettimevars();
|
2022-12-28 21:46:13 +00:00
|
|
|
int setnextmap(bool checksecretexit);
|
2021-12-04 12:02:38 +00:00
|
|
|
void prelevel_d(int g, TArray<DDukeActor*>&);
|
|
|
|
void prelevel_r(int g, TArray<DDukeActor*>&);
|
2020-07-19 09:57:00 +00:00
|
|
|
void e4intro(const CompletionFunc& completion);
|
2020-09-03 21:10:28 +00:00
|
|
|
void exitlevel(MapRecord *next);
|
2020-09-09 20:42:01 +00:00
|
|
|
void enterlevel(MapRecord* mi, int gm);
|
2020-07-18 22:26:36 +00:00
|
|
|
void donewgame(MapRecord* map, int sk);
|
2020-08-23 18:44:17 +00:00
|
|
|
int playercolor2lookup(int color);
|
2020-07-15 16:10:31 +00:00
|
|
|
void PlayerColorChanged(void);
|
2021-01-02 00:04:03 +00:00
|
|
|
bool movementBlocked(player_struct *p);
|
2020-07-19 17:13:27 +00:00
|
|
|
void loadcons();
|
2021-05-15 15:15:29 +00:00
|
|
|
void DrawStatusBar();
|
2022-12-08 23:44:48 +00:00
|
|
|
void thunder(void);
|
2022-12-11 14:42:33 +00:00
|
|
|
bool checkhitswitch(int snum, walltype* wwal, DDukeActor* act);
|
2020-07-07 02:54:12 +00:00
|
|
|
|
2022-12-03 18:10:10 +00:00
|
|
|
void drawshadows(tspriteArray& tsprites, tspritetype* t, DDukeActor* h);
|
2022-12-03 18:33:13 +00:00
|
|
|
void applyanimations(tspritetype* t, DDukeActor* h, const DVector2& viewVec, DAngle viewang);
|
2022-12-03 18:10:10 +00:00
|
|
|
|
2022-12-28 21:46:13 +00:00
|
|
|
int LookupAction(DDukeActor* self, FName name);
|
|
|
|
int LookupMove(DDukeActor* self, FName name);
|
|
|
|
int LookupAI(DDukeActor* self, FName name);
|
|
|
|
|
|
|
|
|
2022-09-30 17:06:44 +00:00
|
|
|
inline int32_t krand(void)
|
|
|
|
{
|
|
|
|
randomseed = (randomseed * 27584621) + 1;
|
|
|
|
return ((uint32_t)randomseed) >> 16;
|
|
|
|
}
|
|
|
|
|
|
|
|
inline double krandf(double span)
|
|
|
|
{
|
|
|
|
return (krand() & 0x7fff) * span / 32767;
|
|
|
|
}
|
|
|
|
|
2022-08-22 18:08:45 +00:00
|
|
|
inline double zrand(double spread)
|
2022-02-12 11:37:27 +00:00
|
|
|
{
|
2022-08-22 18:08:45 +00:00
|
|
|
int r = krand() % FloatToFixed<8>(spread);
|
|
|
|
return FixedToFloat<8>(r);
|
2022-02-12 11:37:27 +00:00
|
|
|
}
|
|
|
|
|
2020-07-06 20:23:18 +00:00
|
|
|
END_DUKE_NS
|