Commit graph

39 commits

Author SHA1 Message Date
Sal
653766010d FRIENDCODE (aka, Teamplay) 2024-09-17 01:41:26 +00:00
Sally Coolatta
d99335d5a0 Fix game crashing trying to load ghost brief
Replay code was not prepped for adding/removing RNG classes yet. Oops!

G_CompatLevel was not put on the changes from the previous commit, as we are planning on breaking all the compat for the new TA changes anyways. Just preventing this being a problem in the future.
2024-08-19 19:03:00 -04:00
Sally Coolatta
9c2144c340 Give Battle mode item spawners their own RNG class
PR_ITEM_ROULETTE is explicitly meant only for K_FillItemRouletteData, and nothing else is ever meant to use it.

May possibly be the cause of the dedicated overtime desync, but I am not convinced it is.
2024-08-18 18:49:47 -04:00
toaster
b8c67dcc9e Copyright update: Recieved notice of legal name change
(which is formal speak for I got back in contact with an old friend :D )
2024-04-03 20:44:19 +01:00
toaster
224deed01d More copyright updates
- TehRealSalt and Lat` are currently preoccupied, so handle their credits
- Correct some accidential copypastes of existing boilerplate into new files
- Add a handful more of mine
- Consistency for Kaito Sinclaire's online handle
2024-04-02 22:14:49 +01:00
James R
9ff174dd06 Hardcode Frozen Production Frost Throwers (ceiling and horizontal versions) 2023-11-22 23:53:14 -08:00
toaster
bd5fdb3b82 PR_INTERPHUDRANDOM
Fixes several things to do with the boss healthbar.
- Makes its randomised jitter work with interp/pause
- Constantly calling the external PRNG tanks performance, at least on Windows, so this solves that too

Done as a special non-netsynced random class so the author of this commit wouldn't have to create a third suite of duplicated Random functions.
2023-10-25 12:55:44 +01:00
toaster
d3e6c6ab02 Newly added object files: Fix Random classes
- Was previously abusing PR_FUZZ
- Add PR_TRACKHAZARD, for randomised track hazards
2023-09-26 22:10:43 +01:00
AJ Martinez
fa13e7d5bf Fuzzing monkey-input mode 2023-08-27 16:57:39 -07:00
AJ Martinez
3900189199 Auto Spin -> Auto Roulette 2023-08-20 16:26:34 -07:00
AJ Martinez
fbfc75df71 Item box autospin 2023-08-20 05:08:53 -07:00
James R
f5d68783fc Battle UFO spawning behavior
- MT_BATTLEUFO_SPAWNER args[0] is the ID
- Spawn a random UFO from the list spawner at the start of
  Battle
- UFO spawns 200 units above the spawner
- After destroyig a UFO, wait 25 seconds before spawning
  the next UFO (next ID in the list)
2023-06-29 19:49:35 -07:00
Sally Coolatta
54e6efc798 K_AddBot is direct
No longer sends a packet from the server, now all clients do it. Old method is kept just in case.
2023-06-15 12:06:21 -04:00
toaster
a74b7995c9 Implement Follower Audience object
- Replaces Chao audience entirely
    - Convenient, because one of the two default follower types used in the audience is Chao
- Can provide one follower, or a list of followers, on the stringarg1 (seperated by spaces/commas) and it'll pick randomly between them
    - If not provided, uses the mapheader follower list
- Can provide one skincolor, or a list of skincolors, on the stringarg2 (seperated by spaces/commas) and it'll pick randomly between them
    - If not provided, uses the follower's default color
    - If the follower's default color is Match/Opposite or the user provides "Random" in stringarg2, pick a random skincolor
- If arg3 is set, floats in the air
    - MTF_OBJECTSPECIAL in binary format
- If arg4 is set, faces the closest player
    - MTF_AMBUSH in binary format
    - Uses some funny mathematical tricks to avoid checking on the same frame as every other audience member at once
2023-04-20 23:15:56 +01:00
wolfy852
116d8d8f99 Sanity checking and cleanup 2023-02-11 03:08:46 -06:00
wolfy852
276cba4641 Basic alt music
mapheaderinfo's musname field is now a 2 dimensional array, it can take up to 3 tracks and will randomly select between them on level load.
2023-02-08 22:11:37 -06:00
Sally Coolatta
a0adb05c9b Merge branch 'master' into acs 2022-12-31 15:04:51 -05:00
Eidolon
be021baa02 Add extern "C" in C++ to all headers 2022-12-30 19:26:16 -06:00
Sally Coolatta
2a790d10da Merge branch 'master' into acs 2022-12-22 08:24:21 -05:00
toaster
e65d17cd4d Merge branch 'master' of https://git.do.srb2.org/KartKrew/Kart into ironman
# Conflicts:
#	src/g_demo.c
2022-11-21 15:49:29 +00:00
Sally Coolatta
492c068cdd Try some things to reduce rng biases
- Don't clamp all RNG calls to [0, FRACUNIT-1]. Only does this for P_RandomFixed now.
- Use rejection sampling for any clamped RNG calls, to remove modulo bias.
- Because of this, P_RandomRange ranges >= FRACUNIT are no longer undefined behavior.
- Added P_Random/M_Random to grab RNG output directly.
- Shuffle M_Random's RNG as well, since OS rand can be [0,INT32_MAX] instead of [0,UINT32_MAX].
2022-11-12 09:48:59 -05:00
Sally Coolatta
aad784775a Merge branch 'master' into acs 2022-11-03 19:53:43 -04:00
AJ Martinez
0a8e3046e6 Ironman: appease pedantry 2022-11-03 14:58:45 -07:00
AJ Martinez
86366b000c HOSTCODE 'ironman' - WIP 2022-11-03 03:38:54 -07:00
toaster
13c8d45764 Rework bot skin randomisation
- Instead of picking over numskins and adjust the number if it picks an already used skin, build and shuffle a list of allowed skins and pick over that instead.
- Fixes some issues with increased weighting towards the skins immediately after your rivals' skins.
- Use PR_RULESCRAMBLE instead of PR_UNDEFINED.
- Why am I doing it in this branch? I'm getting re-acquainted with how bots are handled between matches in advance of disabling them for bonus events without losing or corrupting data.
2022-10-11 18:42:04 +01:00
Sally Coolatta
df47a5fe39 Commentate code, add a few more CallFuncs 2022-10-06 02:48:43 -04:00
Sally Coolatta
3e4edc534d Remove strange RNG sync hack
Previously it was using P_SetRandSeed, which sets both initial and current seed to the same thing, since it's meant for level load init. It first set all RNG seeds to the current seed, and then it set all of the seeds to their initial value. The comment about this just says its "stupid and hacky", and I have no idea how it even worked before.

Now we send over both init seed and current seed independently and set them both. Hopefully this will fix the desyncs.
2022-09-25 07:02:39 -04:00
toaster
6ab24e6055 Add extra categories and apply based on non-blocking review
- PR_RANDOMANIM // FF_ANIMATE|FF_RANDOMANIM
- PR_BUBBLE // Decorative air bubbles
- PR_RULESCRAMBLE // Netgame rule scrambing events
- PR_ITEM_DEBRIS // Item debris
- PR_ITEM_BUBBLE // Item bubbles
- PR_ITEM_BOOST // Boost
- PR_SMOLDERING // Smoldering particles
- PR_SPARKLE // Endsign and/or Emerald
- PR_MOVINGTARGET // Randomised moving targets
2022-09-24 22:01:00 +01:00
Sally Coolatta
1563660a39 Add a few RNG classes
- PR_ITEM_ROULETTE: Used for item results
- PR_ITEM_RINGS: Flung ring direction
- PR_ITEM_SHRINK: Shrink gun offsets
- PR_PLAYERSTARTS: Battle mode player starts
- PR_TERRAIN: TERRAIN particles
- PR_DECORATION: Generic decoration
- PR_VOICES: Player voice sounds
2022-09-19 00:55:11 -04:00
Sally Coolatta
a60d4a13a1 RNG classes, take 2
Redone version of my old branch
2022-09-19 00:04:57 -04:00
James R
2274129f57 Update copyright year to 2020 2020-02-19 14:08:45 -08:00
Steel Titanium
9a48bc65ec Update copyright statements for changed names 2020-01-06 17:16:27 -05:00
Steel Titanium
a5cdb0a4b3 Update copyright date on source files 2019-12-06 13:49:42 -05:00
mazmazz
c91b2b4456 Update source copyrights to 2018 2018-11-25 07:35:38 -05:00
Inuyasha
f07585191b copyright dates/statements updated and such
(no actual SLOC changes)
2016-05-17 17:42:11 -07:00
Inuyasha
ac03ce39c8 *_Random is now *_RandomByte.
P_RandomChance is now a macro for something that should happen a
certain percentage of time.

P_SignedRandom was moved to a macro. Nobody cared.

# Conflicts:
#	src/p_inter.c
2016-03-29 16:27:55 -07:00
Inuyasha
ce2c2de58a P_Random now using a variant of xorshift
This actually passes most diehard tests, as opposed to the old RNG.
It's also similarly fast.

Internally the PRNG generates a fixed point number from [0,1) now,
which makes P_RandomKey and P_RandomRange much easier to
calculate. P_Random is just a simple shift, as well.

Also, the lack of floating point math in P_RandomKey and
P_RandomRange now is probably for the best.
2016-03-29 16:27:25 -07:00
Alam Ed Arias
a03da73115 SRB2 2.1.2 release 2014-03-17 08:13:16 -04:00
Alam Ed Arias
b93cb1b65a SRB2 2.1 release 2014-03-15 13:11:35 -04:00