#plugins-dev-chat
1 messages · Page 46 of 1
so default, glass, cctv, door
okay I can't for the life of me get the boxcast to detect some simple stairs above 096
var center = Player.Position;
var halfExtents = new Vector3(0.1f, scale.y, 0.1f);
if (Physics.BoxCast(center, halfExtents, Vector3.up, out var hit, Quaternion.identity, 0.1f, ScaleMask))
wouldn't this be enough
bro
bru
@worthy rune will this be fixed sometime?
https://github.com/northwood-studios/LabAPI/blob/9e6f8f78344924194749e42f095426a88549f731/LabApi/Features/Audio/AudioTransmitter.cs#L228
imo it would be better to change the volume on the client instead of having the server do this magic
That would be nice
wait nvm im stupid
BoxCast doesn't return anything already colliding with it
Do player prefabs really not have a capsule collider for simple collision?
check the role's charactermodel
how do you access it
the fpcmodule from IFpcRole maybe
what am I looking for inside it
I meant inside that
so there's no like
collider that's used for movement
a capsule
oh there is
CharacterController
yeah cause I can just cast upwards in the shape of the player collision
that's what I wanted to do so I don't grow into geometry

i realized
im actually not sure why its like that, i checked the base game code at the time and could not find a way to fix it
mixers are fine
isn't the volume down a bit?
i can check again, but it has to be something in the code
Must be the wind
😭
what if we made the speaker decoder to amplify the audio by +3dB
3 darab
IP over Wind
What if I want super quiet?
then you decrease its volume
-Infinity
NaN
Not me accidentally setting HumeShield to float.NaN
I heard broke and repair infinite time

Also sad that SL doesnt push mono exe / ELF so can compile it while the game running
Was made a good system and ofc thats the issue
cant you just multiply the samples before for you send them, or is there a limit to that?
And ofc its not getting from the ENV to get the path 😭
Maybe, idk not my field
But also less processing to just have multiple speakers
With the same ID
Spawning 255 speaker and playing the same voice
i wanna proxy voicemessagtes through speakers
You'd reach a point where it wouldn't matter long before 255 imo
Spawn one to each peepoo
i don't want to waste resources decoding and encoding packets
its not possible to replicate voice through speaker toys even if you could change stuff like mixer group
Sending voice message tru speaker id?
the issue is with volume onoly
i mean replicate the same effects like reverb
Make a SyncVar for volume
volume could probably be fixed
hub volume 😭
Ehat
that's fine
the speakers are affected by the reverb zone anyway
not exactly the way voice chat is but that's okay
reference hub volume
Fixed in 14.1.1.1
I still dont get it
what were you on about with the volume syncvar
that already exists for speakers
but it can't go above 1
Whats the reason for that
We love unity
aww so you cannot metal pipe with 200 volume?
you can
@upper vapor when scp prox chat in #1336031121699377213
if you give me the github repo i can make some changes
like adding a translation or smth
i've added that :3
Everything
smh
for rn tho you probably should just do the stuff on the server 😭
how can I create a wall through which it is possible to shoot?
create a primitive and set it to the same layer as a wall or smth
invisible primitive but collidable
and the ability to shoot at targets behind the wall
Primitive.Flags = PrimitiveFlags.Collidable
im know
,
that makes it invisible
how?
gameobject.layer
but he will be collidable?
yes
i think InvisibleCollider might work, layer 16
it wont matter for the clients as it doesnt sync there, but the raycasts for shots should pass through
how can I check if the gameobject is a pickup?
is there a Pickup.Get option for gameobjects i forgot
otherwise youd need to TryGetComponent(out Pickup p)
nope
how i can make smooth?
make what smooth
animation
like what is that animationgraph for
with one speed
just primitive
-5 +5 -5
in a circle
tbh im not that well known with animation graphs
would encoding for each player that may have different volumes cause any server issues or is it just decoding?
I decode the initial message only once, only modify and encode when a player has a different setting going on
is it bad to encode for every player?
like this:
other than maybe wasting server resoursec idk
would you say there is a better method for smth like this or nah?
but dont think you can set the volume to each player
if yknow a SyncVar would exists 
as said
since there is no volume slider for each player/entity stuff and especally the VoiceAdminToy doesnt have a syncvar for the volume just as a "non networked AudioSource component" dont think you can edit the volume to each player accordingly
this is a server specific setting for intercom
it just grabs the setting for each player and sees if there is an existing msg
if not
make a new msg
and then pipe over whichever message over the connection
also i take it i use VoiceMessage over AudioMessage here?
AudioMessage i believe is speaker
VoiceMessage is a players voice
How
Useful for interacting with c/c++
Never used stuff like TimeSpan
Datetime?
me when i thought those were classes
It's the encoding that killed the server for me
damn
so defo done thing wrong somewhere then
what's ur recommendation for this then?
Use multiple encoders
Cuz encoding with the same instance on the same frame really compresses audio for some reason
It makes the sound inaudible
-# I tested this one 1.5y ago
so create a new encoder for every instance in the loop?
Create a list of encoders and if there aren't enough, add a new one
wdym if there arent enough?
Also make the buffers static
Like
List has 5 encoders
And you're sending to 6 players
Also, use GroupBy
how do i work out how many players use 1 encoder? by the volume they have set?
And you'll need to create another buffer for the amplified sound, this code aggregates volume
You can just use them regardless of player
ur confusing me so much 😭
like
where do i use groupby
when do i create a new encoder instance
everything
nothing is making any sense
On ReadyList
also make the encoders static?
That would probably be better, yeah
there is no explanation why tho
Because you shouldn't re-allocate the encoder every time the event is called
also what would I even check for in the group by? group by the volume set or?
Opus is a native library so it's even more resource intensive compared to a "simple" managed constructor
Yep
but you also say that i shouldnt use the same encoder instance for each player
im so confused 😭
which one should and shouldnt i do 😭
Okay so
Create a static list for the encoders
If the list has less than i encoders, add a new one, otherwise reuse the existing one
Increase i variable in the event handler per volume group
You can make the i variable anything
-# Duh
how else am i gunna grab the right encoder for the right volume 😭
No need for "right volume"
You can use any encoder that's available
Consider refactor -> extract method
That's quite the foreach lol
hey im just doing what you recommended
Yeah it's just you can break it up into multiple methods later
idk how to check if one is available though 😭
where?
Make the dictionary a list and I++ at the end of the loop
Don't forget the bounds check
like check if the item exists or?
true
my guess is "Using" gets called before the person triggers the intercom, when is "Used" triggered? once they finish or once they start
this is the problem with these types of wordings sometimes 😭
Once they finish
thanks david
No problem
david pls fix the game
No I will break it so it only affects your plugins
based david /j
he already does that 
@upper vapor just found out smth
SendingVoiceMessage event during intercom uses the proximity channel
wtf
am i doing smth wrong 😭
You can still hear in proximity
Must be another event for the intercom
Or some sort of special handling
so
there is using and used intercom
i’ve practically given up now though
like
in testing
the slider setting didn’t work in some points
or i sounded terrible
so
Ill like
figure this stupid role changed event thing
and make the speaker toy volume up to 200%
@icy knoll how about that
Will that be enough?
what 😭
Then what was the opus encoder thing all about
modifying the volume of intercom for each client
that’s what i’m doing
Oooooh
why though
like
what's wrong with having an intercom slider, and even a CASSIE slider
I want to control idiviual player voice
since some player loud af
some player is just barly hearable
someone big brain
// main assembly
public abstract class Shit
{
internal void FuckIt() { }
}
public class Sto
{
public Sto()
{
SecondaryShit test = new(); // magic ways for get class from other assembly like Assembly.GetAssemblies().Select(r => r.GetTypes()).Where(...);
test.FuckIt(); // INACESSABLE ERROR WHY
}
}
// other assembly
public class SecondaryShit : Shit
{
}
why it works so stupidly?
internal's only accessible to the owning assembly
wat
you can use [InternalsVisibleTo] on the assembly
oh wait
this isuh
maybe vs is just dumb
oh wait
your type
is not
maybe also read the error more carefully 
why it must
me dont need it public
its called from the same assembly
on a different assembly type
cuz you didn't change it
show the error then
inaccessable
I dont get what you want or how
Why are you censoring specifiers
you cannot create a Cycrualr dependency
Also yeah if you don't give us the exact stuff you're doing, it's not gonna help
why can't I call an internal method from a type from another assembly if another type inherits a type that is in the same assembly where the internal method is defined?
bruh
If you wanna do that, do protected internal
me when I use the C# specifier that only makes it accessible to the defining assembly and then wonder why other assemblies can't use it

if there was logic, it would have worked
no
internal is defining assembly only
protected is current & deriving classes only
protected internal is both these
Not a lack of logic, you just need to learn more about C# ^^
you can still have it internal only
but you have to make the variable's type to a type in the same assembly where you're calling it from
axwabo moment
Read how C# works then
This just screams misuse/bad code
If you're getting all types from another assembly that derive from your base class
Why are you using the other assembly's type instead of your base class
the whole point is to use the base class and just call those methods
you have to create a class with
(Shit)Activator.CreateInstance(Type)
yup
because it module system
... and?
it dont must be in the same assembly
ok... and what in my statements say same assembly
You have your base class in assembly A

Assembly B has multiple classes that derive from base
In assembly A, get all types that derive from the base class in Assembly B, and do var module = (TheBaseClass)Activator.CreateInstance(type);
and now you call the methods in your base class
you don't reference assembly B at all
And if your base class has stuff like OnEnable() and all
These have to be protected
not internal
@grand flower I almost have it but like there is some volume effect that just makes your screen black even after you reset role
Idk what it is or where it is
Disabling all volumes doesnt make it disappear
We don't have it here 
Did you do like
moving the PlayerChangedRole to Update()
because that works perfectly fine
Well.. if you want it to call once
No breakage whatsoever in our codebase and we use that event a lot
When you change role multiple times a frame
im wanna hide fucking constructor for classes who : Module
i mean changing multiple times a frame already causes breakage beforehand, no?
No clue
I might just resort to that
I don't think anybody does that
and even if you do, even if you "technically" changed role, it's not like it matters in the end, since you immediately overwrite it with another
(and if devs want to overwrite the role you're changing into, there's PlayerChangingRole for that)
show code
like actual code not obfuscated pseudocode
you dont like class Shit and SecondaryShit (
Hey if you don't want help, suit yourself
but now im try do other so later
Your pseudo code doesn't hide the constructor
If it doesn't work out
Also not sure what you want to do there
im too idk
...
I'm already confused about the code
lol
Also wait, your code is wrong
you created a circular dependency that cannot even build
yeah we told them multiple times
its just example
also is it like, when you die?
Yep
You die and sometimes it just makes your screen black
I think it's when you're killed by anything but a player
The problem is the example tries to say a story which is wrong from the start
It fades to black
And doesnt reset unless you switch spectsator
When you get killed by a player, a few seconds later you're forced to spectate the killer
bummer
it does happen if you die and revive on the same frame too
like if you die on the frame of a spawnwave and get respawned
you get faded to black while alive

which assembly have .ChangeAppearance(this Player pl)?
exiled
wtf
no it's exiled
No it is not part of labapi
but how it works without exiled then
You can copy the code over
it's just an extension method that sends a fake role sync message
Just make sure it's updated for 14.1.1
oh david
Are you gonna like, make the role sync message have the scale
it's just a utility exiled has
it's not exiled code
it just manually writes a message that fits SL's role sync message
For now I just ended up writing a scale message right after the fake role sync message which works
how i can call internal constructor by type from other assembly with : class from the same assembly?
main
Activator.CreateInstance()
other
get the constructorinfo with reflection

var ctor = typeof(MyType).GetConstructors(BindingFlags.Instance | BindingFlags.NonPublic).FirstOrDefault(c => !c.GetParameters().Any());
var instance = (MyType)ctor.Invoke(new object[0]);
googling took 5 seconds
how are you gonna pass that from the base class
Loop through all the constructors and print parameters
^
its found
but dont works
;\
why it dont wanna find with this flag
if it internal
internal != public
var ctor = moduleType.GetConstructor(BindingFlags.NonPublic | BindingFlags.Instance, null, CallingConventions.HasThis, [typeof(IHandlersRegister)], null);
if (ctor != null)
{
var instance = (IModule)ctor.Invoke(args);
}
how i can use invisible symbol in the hint?
exists vertical offset without offset on center?
Spaces
Dead
Glad
dont works im guess
its already with spaces
but, ?
..........
Not my issue
Slejm
And also cant help since not using anything fancy with the hint system
Why are you
Ur nothing
:sob
#sobbing
How could u do this to me
Id do it again for a chicken nugget
Reporting you to HR!
not if i report HR to HR
Anyway hope you have a pillow, cus u about to cry on it when I gonna go and say good night
L
good night
its doesnt have matter
it just rotating the fucking symbols
when its not for rotate
yeah thats happened to me too
idk why it happens
just try changing something
¯_(ツ)_/¯
Im using Player.Scale to set someones scale, but as of currently unknown reasons, some players dont see scaled players as their server side scale.
I can only assume it is players that join after the scale command is ran, but dont have any details for it :c
Does anyone have any leads on what might be wrong?
In this screenshot i used a command to scale myself to 0.0001 on all axis, which correctly scaled me for all players present with me at the time, and myself.
Then after some time, a player took this picture:
!nwmoment
oh :x
i was hoping this was somehow my fault and quickly fixable
It's getting a plethora of fixes
But yeah if it's reproduceable report it directly to the github IMO
Since that's mostly LabApi
Although it is supposed to send to players that join later
Do you do any kind of fake role sync?
Although could be that the scale message is sent before the player's role
@unique crane maybe another reason to send the scale in the role sync message?
That way you can just get rid of sending it in the ScaleController when a player joins
I have scripts for that too, but they were not in use, no
Fair warning then, you need to send the scale message to the player you're sending the fake role sync to, right after
If the scale isn't default
But in what you describe, it shouldn't be an issue no
Does anyone have any ideas to this, because it still just does not want to work :/
Download it from the steam app
You're having trouble updating it?
Yes
Try ".\steamcmd.exe" +login anonymous +force_install_dir ".\Local Admin Server" +app_update 996560 -beta public +quit
Usually changing the branch around forces an update
Alright, thank you :]
Is skeleton's interaction blocker Client-Side or Server-Side?
I want to know if it's possible to allow him to use certain items
@unique crane another oddity caused by PlayerChangedRole being called later is ServerWaveRespawned being called before it now
can break some plugins that expect otherwise, but an "easy fix" for them anyway. Took me 2 mins
Question:
What's the best way to figure out if a player is in the line of sight of another player?
lemme finish fixing something here and i'll check
My hero 🙏🏼
what file is that
Scp173ObserversTracker
Took me like 10 minutes sorry about that 😅
VisionInformation.GetVisionInformation does most of the checks
Checks if the player is looking in the direction of 173 with a dot product
then checks that it's unobstructed via raycast
and then on top of that, if it returns true, 173's observer tracker does multiple raycasts at different points of the model
to help make it more accurate
if any of those casts are unobstructed, you're looking at it
Interesting
I wonder how I'm gonna make this work for my purposes lol
Whatcha trying to do
Makes sense that order changes
@random scaffold if you haven't figured the constructor thing out, try AccessTools.DeclaredConstructor
I have some dummies and I want them to be able to shoot at players they're able to see
tbh a simple raycast would work
check via the visibility controller that they're visible, raycast to check LOS, maybe add a distance check and you're good to go
How should I go about preventing my raycast from hitting the dummy I'm raycasting from? I was thinking to just start at an offset down the direction but idk
Dummy.Camera.transform.position + Dummy.Camera.transform.forward * 0.1f
Yeah I'm uh
try 0.1 - 0.2
that's what transformpoint does
transform.TransformPoint
give it a forward vector
it translates local space into world space
Oh so it'll just offset it
yes
And it accounts for rotation?

yeah that works
np
Why not use the built-in VisionInformation
Is it faster/easier?
If so I'll gladly use it
i don't think visioninformation works in this case cuz we need direct line of sight
or maybe it could be used actually
It has a check if i recall correctly
yep
there are different methods to do it inside visioninformation
get the simplest one that contains the data you need
Or just copy paste into your code
You can just don't do anything which also an option, or use VI as david said
But idk how VI works is the point
Raycast is easy because it's literally just a ray
Yup
If it works for you then yea sure
uh
found a problem with PlayerEvents.LeavingPocketDimension
IsSuccessful does nothing
the two methods that call the event don't use it

So you have pretty much no way to change the outcome of leaving the pocket dimension
But is VI better?
If so I wanna learn it
I just have never known about it
I want dummies to look at and shoot players in sight
Would be cool if I could account for that
VI has it
How do I use it 😭
As a parameter for
Idk , check how its being used
Check how its done for 096 i think
@slate flume It is very simple:
VisionInformation.GetVisionInformation(
ReferenceHub source,
Transform sourceCam,
Vector3 target,
float targetRadius = 0,
float visionTriggerDistance = 0,
bool checkFog = true,
bool checkLineOfSight = true,
int maskLayer = 0,
bool checkInDarkness = true)
{
eh copy paste shit
But basically you have this static builder method
https://github.com/northwood-studios/LabAPI/issues/189 opened an issue for the bug
And then you have these properties you can use
So you might want to check for the LookingAmount is greater than something
And if they are in darkness
Yo baller
🔥
traumatized effect
I suggest you applying to QA
Alone soundtrack
A server host
I develop for Bright's but it's not my job
I do reccomend putting the targetRadius to like 1.1f
So you account for the player width
Gotcha gotcha
But you did mention using the LookingAmount, should I instead go for that?
IsLooking
Will be true if you can see the player on any part of the screen
LookingAmount if how much is the player close to the center
Interesting
I might add wrapping methods for this to the player class
Is IsLooking will register if any amount of the player shows on the screen and in any other cause will return false, correct?
Thanks
❤️
// TODO: Remove when NW fixes this
[HarmonyPatch(nameof(PocketDimensionTeleport.OnTriggerEnter))]
[HarmonyPrefix]
public static bool OnTriggerEnter_Prefix(PocketDimensionTeleport __instance, Collider other)
{
if (!NetworkServer.active)
{
return false;
}
var component = other.GetComponent<NetworkIdentity>();
if (!component || !ReferenceHub.TryGetHubNetID(component.netId, out var hub) || hub.roleManager.CurrentRole.ActiveTime < 1.0)
{
return false;
}
// Call PlayerEvents.OnLeavingPocketDimension() here.
var isSuccess = __instance._type == PocketDimensionTeleport.PDTeleportType.Exit && !AlphaWarheadController.Detonated;
var args = new PlayerLeavingPocketDimensionEventArgs(hub, __instance, isSuccess);
PlayerEvents.OnLeavingPocketDimension(args);
if (!args.IsAllowed)
{
return false;
}
if (args.IsSuccessful && !AlphaWarheadController.Detonated)
{
PocketDimensionTeleport.Exit(__instance, hub);
}
else
{
PocketDimensionTeleport.Kill(__instance, hub);
}
return false;
}
for those looking to fix the OnLeavingPocketDimension event
you also need two patches to get rid of the OnLeavingPocketDimension calls in PocketDimensionTeleport.Exit/Kill
Wait, why kill & exit try run OnLeaving instead of OnLeaved?
they do
the issue with the event is that IsSuccessful does nothing atm
you can't change whether or not the player dies/leaves
the patch fixes that
Are you sure this is a bug?
Ah okay
wanted to increase the chances of escape
just seems weird that these are included in the outcome branches and not the determine one
These are called when the player enters the triggers
yep
So technically Leaving should be put here
in the base game yes
and not in those functions, that is why I was wondering if those are bugs or not
my patch does that
^
this is base game
it does leaving in the exit/kill code
instead of before where IsSuccessful can change the outcome
so right now, it's useless
Oh so it changed in past
can confirm my patches work
sec
// Removes the OnLeavingPocketDimension call.
[HarmonyPatch(nameof(PocketDimensionTeleport.Exit))]
[HarmonyTranspiler]
public static IEnumerable<CodeInstruction> Exit_Transpiler(IEnumerable<CodeInstruction> instructions, MethodBase method, ILGenerator generator)
{
var matcher = new CodeMatcher(instructions, generator)
.MatchStartForward(
new(OpCodes.Ldarg_1),
new(OpCodes.Ldarg_0),
new(OpCodes.Ldc_I4_1),
new(OpCodes.Newobj),
new(OpCodes.Dup),
new(OpCodes.Call),
new(OpCodes.Callvirt),
new(OpCodes.Brtrue_S),
new(OpCodes.Ret)
)
.ThrowIfNotMatch("Could not find call to PlayerEvents.OnLeavingPocketDimension(), did NW fix it?")
.RemoveInstructions(9);
// Grab the label on the current instruction.
// We'll go back to the start and apply it to the first brtrue.s
var label = matcher.Instruction.labels[0];
matcher.Start()
.MatchEndForward(
new(OpCodes.Ldarg_1),
new(OpCodes.Ldfld),
new(OpCodes.Callvirt),
new(OpCodes.Isinst),
new(OpCodes.Stloc_0),
new(OpCodes.Ldloc_0),
new(OpCodes.Brtrue_S)
)
.ThrowIfNotMatch("Failed to find instructions, did NW change it?")
.SetOperandAndAdvance(label);
return matcher.InstructionEnumeration();
}
// Removes the OnLeavingPocketDimension call.
[HarmonyPatch(nameof(PocketDimensionTeleport.Kill))]
[HarmonyTranspiler]
public static IEnumerable<CodeInstruction> Kill_Transpiler(IEnumerable<CodeInstruction> instructions, MethodBase method, ILGenerator generator)
{
return new CodeMatcher(instructions, generator)
.MatchStartForward(
new(OpCodes.Ldarg_1),
new(OpCodes.Ldarg_0),
new(OpCodes.Ldc_I4_0),
new(OpCodes.Newobj),
new(OpCodes.Dup),
new(OpCodes.Call),
new(OpCodes.Callvirt),
new(OpCodes.Brtrue_S),
new(OpCodes.Ret)
)
.ThrowIfNotMatch("Could not find call to PlayerEvents.OnLeavingPocketDimension(), did NW fix it?")
.RemoveInstructions(9)
.InstructionEnumeration();
}
uhh why patch it there
unless you wanna call OnLeavingPocketDimension twice
you have to remove it from those methods
after moving it to OnTriggerEnter
aye
tested in game, it works
a kill exit let me out the next attempt
// Give players an 80% chance of success.
args.IsSuccessful = UnityEngine.Random.value <= 0.8f;
Hmm, one interesting thing about this, is that now you cannot force it to become impossible to escape
Or you cannot invoke the event without interfering with the outcome
Your fix does the correct way
but hmm, does this contextual boolean parameter used in other events?
not IsAllowed, but other booleans, where it prevents execution or changes the outcome
hmmmm
well
PlayerChangingRole does
IsAllowed can prevent it
but it also has NewRole that you can change to override
you can change the role & spawnflags
That one yeah, where there is a parameter which gives the "this'll be the current result, but you can change it"
don't remember any other
actually
UpdatingEffect too
you can prevent it, but also change the Intensity/Duration that's gonna be set
I kinda like that they've done it this way
InteractingDoor
IsAllowed, CanOpen
bool canOpen1 = this.RequiredPermissions.CheckPermissions(ply, (IDoorPermissionRequester) this, out callback);
...
PlayerInteractingDoorEventArgs ev = new PlayerInteractingDoorEventArgs(ply, this, canOpen1);
yup
Opening doors, generator
What values yall set to make the primitives glow
make alittle transparent, and 50x the other color channels
also requires some light source to be on it, it wont glow in the dark
ah
I think someone did it here as
1, 50, 1
used xbox record
Lmao
You should add a [ColorHdr] or something to the color

In the primitive toy
what
wrong using
internal static IEnumerator<float> FuckingCoroutine()
{
while (true)
{
yield return Timing.WaitForSeconds(1);
}
}
Timing.KillCoroutines - will it be able to forcibly stop the cycle?
Yes
Any ways to get user input like with GetAction? Or only SSS?
only SSSS
or use noclip event
sadly
or weapon fire / flashlight / inspect
garrys mod moment
how can I hide information when pointing at a player?
Player info area
how i can stay nothing?
0
it doesnt exists

h
oh
lol
it really works that
ev.Player.InfoArea = 0;
Skull
You're a skull
thats done with fakesync and math right
i tried reverse engineering Transform.LookAt() but i couldnt figure it out. im sure theres an algorithm for it but idk
wym
player.Rotation
i was thinking more a semi complex algorithm lol
I wonder how bad that would be on TPS
probably not at all
Servers confuse me, I run one for fun but sometimes it has problems that i cant explain
once it crashed because of UCR despite nothing being super wrong
and the other day it had a few major network freezes for half a minute but it only happened towards the end
Why is that the players can't reload their guns when they're Scale is 0.8, the animation plays but the ammo doesn't reload and if they press it again the animation forcefully starts again. No error
you sent the spawn message to the dedicated server
use Player.ReadyList
wherever possible
permanent ?
or per round
cuz you can just do Player to int dictionary
if its 1 round
and you dont care of losing if they leave
per round
Obviously you did not give them permission to reload their guns, like the dictator you are...

Okay thanks
Hardcore Mode trollface
Kill 3114 with 1 magazine
patch out the dedicated server player being disconnected
you'll be happier
How can I do that?
with harmony 
sec
there's a bunch of places
public static class NWDedicatedServerDisconnectPatch
{
[HarmonyTargetMethods]
public static IEnumerable<MethodBase> TargetMethods()
{
yield return AccessTools.Method(typeof(NetworkConnectionToClient), nameof(NetworkConnectionToClient.Disconnect));
yield return AccessTools.Method(typeof(NetworkConnectionToServer), nameof(NetworkConnectionToServer.Disconnect));
yield return AccessTools.Method(typeof(LocalConnectionToClient), nameof(LocalConnectionToClient.Disconnect));
yield return AccessTools.Method(typeof(LocalConnectionToServer), nameof(LocalConnectionToServer.Disconnect));
}
public static bool Prefix(NetworkConnection __instance)
{
// Block the dedicated server player from ever disconnecting.
if (__instance.connectionId == 0)
{
Logger.Error("Critical: attempted to disconnect the dedicated server player. This has been blocked.");
return false;
}
return true;
}
}
Thanks
[HarmonyPatch(typeof(NetworkServer), nameof(NetworkServer.UnpackAndInvoke))]
public static class HostDisconnectPatch
{
public static void Postfix(ref bool __result, NetworkConnectionToClient connection, NetworkReader reader, int channelId)
{
// If the connection is 0 (the dedicated server), force the result to be true.
// We do not want to disconnect the dedicated server, it causes MASSIVE issues.
// If you see a " NetworkServer: failed to unpack and invoke message. Disconnecting 0." you probably sent a message to the host.
// Do not do that. Use Player.ReadyList or check Player.IsHost before sending a network message.
if (connection.connectionId == 0)
{
__result = true;
}
}
}
imma rewrite SL in godot without a host
-# is what i would say if i had the dedication and godot knowledge
it's so stupid that mirror lets you do that
I've had a few close calls where I was gonna say fuck it and just start my own in Unreal
but I like SL enough to stay on it, for now
there's already sl-like godot game
sl-like
imagine actual SL in Godot
with a mirror wrapper that offers compat with existing servers
yeah because it was literally called slclone
bybygaga
that'd be a majestic pain in the ass
oh i rember
that's a cool project
ignoring the fact they're two different engines
and SL's already a pain in the ass to work with sometimes
Sorry, i was thinking about Exiled's SetFakeScale method. I thought that was from LabAPI and you meant that.
Then no, i am using no fake role sync
And i will write the bug report about it shortly
Guys, i made a custom keycard generator but the support told me to ask if anyone of you guys wanna help me?
what
what r we helping you with
aye fair enough
and whyd you go to support
@unique crane apologies if you already replied to me about this yesterday and I didn't see it, but any chance of the scale being part of the role sync message?
would solve this dev's problem
for the fact you made a generator
technical
yes....
and hows a card generator related to technical issue like a crash
no
sob
But still wouldnt solve other property set on role changed
hi david
I mean at the very least those would be sent after the role sync info message anyway
what was the exact purpose of contacting support
Haiii
But with this you're guaranteed to have the correct scale for newly connected players since they'll get it with the role sync info
!!!
Is there any more patches which fixes bugs? 😄
These ones I send because i've talked about them a lot and fixed them myself
The codebase isn't mine so I can't sent the others we have
Ah okay
Hell no fuck mirror
@grand flower Found that sneaky black screen bastard
Now the question is
why
Oh its because the full hit is nan
Im looking at that right now
Alos what r these values for xd
But why is hitfull nan
Also nice typo
tVo:lume
Idk never used those
Probably nan
Or 0
-Infinity 
If Unity's not stupid it should just return the closest value
so like if you evaluate at a time greater than the last keyframe you just get the value of the last keyframe
although if you evaluate at NaN I have no idea
Won't nan return the curve until the curve gets nan??
Are you sure
Guh
I like how there is a method that returns "how much dead you are"
I just realized that
Lool
Hey maybe if I fix this



