Raised This Month: $51 Target: $400
 12% 

[Help]Reset func_train


Post New Thread Reply   
 
Thread Tools Display Modes
Hedgehog Fog
Senior Member
Join Date: Jun 2010
Location: Ukraine
Old 04-17-2015 , 15:41   Re: [Help]Reset func_train
Reply With Quote #11

I still haven't found a solution...
__________________

❄️ CS Snow Wars - Mod based on snowballs fights
🧟 CS Zombie Panic - A port of HL Zombie Panic!
🎃 CS Halloween Mod - Completely new gamemode for Halloween Holidays
📦 AMXXPack - CLI and build system for amxx projects
🔧 Custom Entities API - API to register custom entities

Last edited by Hedgehog Fog; 04-17-2015 at 15:41.
Hedgehog Fog is offline
Arkshine
AMX Mod X Plugin Approver
Join Date: Oct 2005
Old 04-17-2015 , 16:56   Re: [Help]Reset func_train
Reply With Quote #12

Assuming calling Restart is not enough, what is your issue exactly? Are you saying HL1 is bugged around func_train?
__________________
Arkshine is offline
Hedgehog Fog
Senior Member
Join Date: Jun 2010
Location: Ukraine
Old 04-17-2015 , 17:41   Re: [Help]Reset func_train
Reply With Quote #13

I need to reset all func_train values(target, activation, current target etc.), HAM_CS_Restart isn't enough for this.
__________________

❄️ CS Snow Wars - Mod based on snowballs fights
🧟 CS Zombie Panic - A port of HL Zombie Panic!
🎃 CS Halloween Mod - Completely new gamemode for Halloween Holidays
📦 AMXXPack - CLI and build system for amxx projects
🔧 Custom Entities API - API to register custom entities

Last edited by Hedgehog Fog; 04-17-2015 at 17:42.
Hedgehog Fog is offline
Arkshine
AMX Mod X Plugin Approver
Join Date: Oct 2005
Old 04-17-2015 , 17:55   Re: [Help]Reset func_train
Reply With Quote #14

You don't answer really.
__________________

Last edited by Arkshine; 04-17-2015 at 18:12.
Arkshine is offline
Hedgehog Fog
Senior Member
Join Date: Jun 2010
Location: Ukraine
Old 04-17-2015 , 18:01   Re: [Help]Reset func_train
Reply With Quote #15

PHP Code:

new const Float:g_vecZero[3] = {0.00.00.0};

//const m_flWait = 44;
//const m_toggle_state = 41;

//func_train
const m_pevCurrentTarget 79;
//const m_sounds = 79;
const m_activated 81;
const 
m_pfnThink 4;
const 
m_pfnCallWhenMoveDone 64;
new const 
m_vecFinalDest[3] = {65, ...};
new const 
m_vecFinalAngle[3] = {68, ...};
//const m_hEnemy_serialnumber = 85;
//const m_hTargetEnt = 86;
//const m_hEnemy = 84;

public ent_reset_train(ent)
{
    if(!
get_cvar_num("zi_reset_train"))
        return 
0;
    
    static 
target[32];
    
    for(new 
0entTrainsNumi++)
    {
        if(
entTrainFirstTarget[i][_trainID] == ent)
        {
            
copy(targetcharsmax(target), entTrainFirstTarget[i][_trainFirstTarget]);
            break;
        }
    }
    
    
set_pev(entpev_velocityg_vecZero);
    
set_pev(entpev_targettarget);
    
set_pev(entpev_enemy0);
    
set_pev(entpev_message0);
    
set_pev(entpev_spawnflagspev(entpev_spawnflags) | SF_TRAIN_WAIT_RETRIGGER);
    
set_pev(entpev_nextthink0);
    
    
set_pdata_int(entm_activated0);
    
set_pdata_int(entm_pevCurrentTarget0);
    
set_pdata_int(entm_pfnCallWhenMoveDone0);
    
    for(new 
03i++)
    {
        
set_pdata_float(entm_vecFinalDest[i], g_vecZero[i]);
        
set_pdata_float(entm_vecFinalAngle[i], g_vecZero[i]);
    }
    
    
set_pdata_int(entm_pfnThink0);
    
    
//dllfunc(DLLFunc_Think, ent);
    
ExecuteHamB(Ham_CS_Restartent);
    
    return 
0;

Quote:
what is your issue exactly?
Train emit sound and moving in the wrong direction after activation.

Quote:
Are you saying HL1 is bugged around func_train?
I think yes.

Here test map:
Attached Files
File Type: zip func_pieceofshit.zip (141.5 KB, 56 views)
__________________

❄️ CS Snow Wars - Mod based on snowballs fights
🧟 CS Zombie Panic - A port of HL Zombie Panic!
🎃 CS Halloween Mod - Completely new gamemode for Halloween Holidays
📦 AMXXPack - CLI and build system for amxx projects
🔧 Custom Entities API - API to register custom entities

Last edited by Hedgehog Fog; 04-17-2015 at 18:24.
Hedgehog Fog is offline
Hedgehog Fog
Senior Member
Join Date: Jun 2010
Location: Ukraine
Old 04-18-2015 , 07:09   Re: [Help]Reset func_train
Reply With Quote #16

I fixed it. I'll write about it later.
__________________

❄️ CS Snow Wars - Mod based on snowballs fights
🧟 CS Zombie Panic - A port of HL Zombie Panic!
🎃 CS Halloween Mod - Completely new gamemode for Halloween Holidays
📦 AMXXPack - CLI and build system for amxx projects
🔧 Custom Entities API - API to register custom entities
Hedgehog Fog is offline
safetymoose
Senior Member
Join Date: Feb 2015
Old 07-06-2015 , 18:33   Re: [Help]Reset func_train
Reply With Quote #17

so did you get it working?
safetymoose is offline
Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 03:24.


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