MCPcopy Create free account
hub / github.com/bfbbdecomp/bfbb / zEntPlayerSpeakStart

Function zEntPlayerSpeakStart

src/SB/Game/zEntPlayer.cpp:2879–2900  ·  view source on GitHub ↗

WIP, not equivalent

Source from the content-addressed store, hash-verified

2877
2878// WIP, not equivalent
2879void zEntPlayerSpeakStart(U32 sndid, U32, S32 anim)
2880{
2881 zEntPlayerSpeakStop();
2882
2883 player_talk.data = xJaw_FindData(sndid);
2884 if (player_talk.data)
2885 {
2886 player_talk.sndid = sndid;
2887 player_talk.time = 0.0f;
2888 if (anim < 0 || anim >= globals.player.s->talk_anims)
2889 {
2890 // wtf is happening here
2891 U8 filter_size = globals.player.s->talk_filter_size;
2892 U32 which = (xrand() >> 13); // / filter_size;
2893 player_talk.anim = globals.player.s->talk_filter[which % filter_size];
2894 }
2895 else
2896 {
2897 player_talk.anim = anim;
2898 }
2899 }
2900}
2901
2902// Equiavlent: sda scheduling reorder
2903void zEntPlayerSpeakStop()

Callers 1

trigger_soundFunction · 0.70

Calls 3

zEntPlayerSpeakStopFunction · 0.85
xrandFunction · 0.85
xJaw_FindDataFunction · 0.50

Tested by

no test coverage detected