AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Plugins (https://forums.alliedmods.net/forumdisplay.php?f=108)
-   -   [CSGO] Panorama Map Crash Fix (v1.4.0 30/03/2019) (https://forums.alliedmods.net/showthread.php?t=315212)

Kashinoda 03-29-2019 00:03

Re: [CSGO] Panorama Map Crash Fix (v1.1.0 28/03/2019)
 
Quote:

Originally Posted by sneaK (Post 2645331)
Odd, when testing by myself, the server looped retrys and I could never get in-game. Seems as though server_spawn is being fired every time the first client joins. Windows server, hibernation disabled. I'll try messing with configurations and report back if I get it solved. Great solution, much more proper than the existing one!

I'm on Ubuntu Server so maybe that's Windows specific? Seems weird, do you have any plugins that might trigger server_spawn?

https://i.imgur.com/Ol3e6Dg.png

If you're able to test, run sm_cvar net_showevents 2 and scan through and see if anything is happening before server_spawn.

EDIT -

The plugin will run when the first person connects to the server, even if hibernation is disabled. In my testing it hasn't caused issues and doesn't loop, I'll see if I can add a check which prevents this running if the server is empty by using GetClientTime().

Kashinoda 03-29-2019 01:42

Re: [CSGO] Panorama Map Crash Fix (v1.1.0 28/03/2019)
 
The retry will no longer fire unless the user has been connected to the server for longer than 5 seconds, this may resolve any issues when players are joining an empty server.

PHP Code:

public Action RetryPlayers(Handle timer)
{
    for (
int i 1<= MaxClientsi++)
    {
                
        if (
IsClientConnected(i))
        {
            
float t GetClientTime(i);

                if(
5)
                {
                 
ClientCommand(i"retry");
                 
LogMessage("User %N Connected for %d seconds, sending retry"iRoundToFloor(t));
                }
        }
    }



Dr.Mohammad 03-29-2019 02:42

Re: [CSGO] Panorama Map Crash Fix (v1.1.0 28/03/2019)
 
Quote:

Originally Posted by Kashinoda (Post 2645340)
The retry will no longer fire unless the user has been connected to the server for longer than 5 seconds, this may resolve any issues when players are joining an empty server.

PHP Code:

public Action RetryPlayers(Handle timer)
{
    for (
int i 1<= MaxClientsi++)
    {
                
        if (
IsClientConnected(i))
        {
            
float t GetClientTime(i);

                if(
5)
                {
                 
ClientCommand(i"retry");
                 
LogMessage("User %N Connected for %d seconds, sending retry"iRoundToFloor(t));
                }
        }
    }



hi guys

i fixed, don't send "retry" to bots.

PHP Code:

public Action RetryPlayers(Handle timer)
{
    for (
int i 1<= MaxClientsi++)
    {                
        if (
IsClientConnected(i) && !IsFakeClient(i))
        {
            
float t GetClientTime(i);

                if(
5)
                {
                 
ClientCommand(i"retry");
                 
LogMessage("User %N Connected for %d seconds, sending retry"iRoundToFloor(t));
                }
        }
    }



Kashinoda 03-29-2019 02:52

Re: [CSGO] Panorama Map Crash Fix (v1.3.0 29/03/2019)
 
Thanks, updated.

uraganas 03-29-2019 04:13

Re: [CSGO] Panorama Map Crash Fix (v1.3.0 29/03/2019)
 
I love you xD

Alexunder 03-29-2019 14:57

Re: [CSGO] Panorama Map Crash Fix (v1.3.0 29/03/2019)
 
i got the crash , betwen 2 to 4 vote map (default)
and i see client is rety , but crash is not fix

Kashinoda 03-29-2019 17:43

Re: [CSGO] Panorama Map Crash Fix (v1.3.0 29/03/2019)
 
1 Attachment(s)
Quote:

Originally Posted by Alexunder (Post 2645471)
i got the crash , betwen 2 to 4 vote map (default)
and i see client is rety , but crash is not fix

Unload that and try this. timer reduced to 0.3.

Alexunder 03-29-2019 18:17

Re: [CSGO] Panorama Map Crash Fix (v1.3.0 29/03/2019)
 
Quote:

Originally Posted by Kashinoda (Post 2645483)
Unload that and try this. timer reduced to 0.3.

thank you for follow up , is not work ,
result :
!map lego_8 (no crash)
!map redline (error join with lobby ... (idk why))
- after join to sv
!map lego_lobo ( freeze retrieving game data , and ez crash XD )

before you publish this plugin , i try for event "player_spawn" + if first round :
Quote:

if(RoundToFloor(GetClientTime(client)) > 120) {
ClientCommand( client , "retry" );
}
bicause 60% players when full load to map and start warmup , after 2s there is got the crash , when i check player if timeconnect over 2 min , when player is spawn quicly "retry" , it's not bad

do you idea for really fix this bug ?

- sorry for bad english

Kashinoda 03-30-2019 10:47

Re: [CSGO] Panorama Map Crash Fix (v1.3.0 29/03/2019)
 
2 Attachment(s)
Your English is good enough :)

It seems the server_spawn event is too late when multiple people are on the server, it sends 'retry' to some clients after 'round_start' which is no good. I didn't experience this when testing with two clients but with more than that the results were bad.

Here's another version, from my testing it will disconnect earlier. This all happens very quickly so it's hard to see how it works on a larger server (I only have a small clan server).

PHP Code:

#include <sourcemod> 

#pragma semicolon 1
#pragma tabsize 0
#pragma newdecls required

public Plugin myinfo =
{
    
name "",
    
author "Kashinoda",
    
description "",
    
version "1",
    
url "http://alliedmods.net/"
};

public 
void OnPluginStart() 

   
AddCommandListener(MapChange"changelevel");
   
AddCommandListener(MapChange"map");
       


public 
Action MapChange (int client, const char[] cmdint argc)
{
    
LogMessage("Map changing, sending 'retry' to clients"); 

      for (
int i 1<= MaxClientsi++) 
        {
          if (
IsClientConnected(i) && !IsFakeClient(i))
              {                 
                 
ClientCommand(i"retry"); 
                 
LogMessage("Sending retry to %N"i); 
              } 
        }     


Here's the terminal output using this:

Code:

map aim_office
L 03/30/2019 - 14:39:05: [test.smx] Map changing, sending 'retry' to clients
L 03/30/2019 - 14:39:05: [test.smx] Sending retry to Kashinoda
L 03/30/2019 - 14:39:05: "Kashinoda<63><STEAM_1:0:xxxxxx><TERRORIST>" disconnected (reason "Disconnect")
L 03/30/2019 - 14:39:05: "Kashinoda<63><STEAM_1:0:xxxxxx><TERRORIST>" [256 704 544] committed suicide with "world"
L 03/30/2019 - 14:39:05: "Kashinoda<63><STEAM_1:0:xxxxxx>" switched from team <TERRORIST> to <Unassigned>
Dropped Kashinoda from server: Disconnect
L 03/30/2019 - 14:39:05: [META] Loaded 0 plugins (1 already loaded)
---- Host_Changelevel ----
L 03/30/2019 - 14:39:05: [META] Loaded 0 plugins (1 already loaded)
*** Map Load: workshop/260679898/aim_office: Map Group funL 03/30/2019 - 14:39:05: Log file closed
Server logging data to file logs/L164_132_203_029_27015_201903301439_000.log
L 03/30/2019 - 14:39:05: Log file started (file "logs/L164_132_203_029_27015_201903301439_000.log") (game "/home/csgosv/serverfiles/csgo") (version "7436")
L 03/30/2019 - 14:39:05: Loading map "workshop/260679898/aim_office"
L 03/30/2019 - 14:39:05: server cvars start


Alexunder 03-30-2019 11:37

Re: [CSGO] Panorama Map Crash Fix (v1.3.0 29/03/2019)
 
Quote:

Originally Posted by Kashinoda (Post 2645550)
Your English is good enough :)

It seems the server_spawn event is too late when multiple people are on the server, it sends 'retry' to some clients after 'round_start' which is no good. I didn't experience this when testing with two clients but with more than that the results were bad.

Here's another version, from my testing it will disconnect earlier. This all happens very quickly so it's hard to see how it works on a larger server (I only have a small clan server).

PHP Code:

#include <sourcemod> 

#pragma semicolon 1
#pragma tabsize 0
#pragma newdecls required

public Plugin myinfo =
{
    
name "",
    
author "Kashinoda",
    
description "",
    
version "1",
    
url "http://alliedmods.net/"
};

public 
void OnPluginStart() 

   
AddCommandListener(MapChange"changelevel");
   
AddCommandListener(MapChange"map");
       


public 
Action MapChange (int client, const char[] cmdint argc)
{
    
LogMessage("Map changing, sending 'retry' to clients"); 

      for (
int i 1<= MaxClientsi++) 
        {
          if (
IsClientConnected(i) && !IsFakeClient(i))
              {                 
                 
ClientCommand(i"retry"); 
                 
LogMessage("Sending retry to %N"i); 
              } 
        }     


Here's the terminal output using this:

Code:

map aim_office
L 03/30/2019 - 14:39:05: [test.smx] Map changing, sending 'retry' to clients
L 03/30/2019 - 14:39:05: [test.smx] Sending retry to Kashinoda
L 03/30/2019 - 14:39:05: "Kashinoda<63><STEAM_1:0:xxxxxx><TERRORIST>" disconnected (reason "Disconnect")
L 03/30/2019 - 14:39:05: "Kashinoda<63><STEAM_1:0:xxxxxx><TERRORIST>" [256 704 544] committed suicide with "world"
L 03/30/2019 - 14:39:05: "Kashinoda<63><STEAM_1:0:xxxxxx>" switched from team <TERRORIST> to <Unassigned>
Dropped Kashinoda from server: Disconnect
L 03/30/2019 - 14:39:05: [META] Loaded 0 plugins (1 already loaded)
---- Host_Changelevel ----
L 03/30/2019 - 14:39:05: [META] Loaded 0 plugins (1 already loaded)
*** Map Load: workshop/260679898/aim_office: Map Group funL 03/30/2019 - 14:39:05: Log file closed
Server logging data to file logs/L164_132_203_029_27015_201903301439_000.log
L 03/30/2019 - 14:39:05: Log file started (file "logs/L164_132_203_029_27015_201903301439_000.log") (game "/home/csgosv/serverfiles/csgo") (version "7436")
L 03/30/2019 - 14:39:05: Loading map "workshop/260679898/aim_office"
L 03/30/2019 - 14:39:05: server cvars start


good idea ! , when i test , change 7 map with "sm_map" , is not crash , map 8 ez crash :) , bicause i think retry for event "sm_map" is so quickly ! and changelevel is not work , maybe bicause timer calculation changelevel is not easy .

i think you see this code :
Code:

public Action OnLogAction(Handle source, Identity ident,int client,int target, const char[] message)
{
        if( StrContains( message , "changed map to" ) != -1)
        {
                CreateTimer( 2.9 , Timer_RetryPlayers , _ , TIMER_FLAG_NO_MAPCHANGE );
        }
}

when is use , i never see any crash for me and players my server (25 player is not crash)
if we can get the name map (Voted) on default vote map , and insert to logaction , we don't see crash for ever .

but i think default vote map , is don't have API for we developer , valve don't like fix this problem , We all know this we can not fix the problem from the base , but we try :attack:


All times are GMT -4. The time now is 21:45.

Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.