Raised This Month: $ Target: $400
 0% 

Newest CS:GO update crashing with SourceMod?


Post New Thread Closed Thread   
 
Thread Tools Display Modes
psychonic

BAFFLED
Join Date: May 2008
Old 12-25-2012 , 22:44   Re: Newest CS:GO update crashing with SourceMod?
#101

Quote:
Originally Posted by Zephyrus View Post
i assume that they didnt change the order of fields, if we can use indexes cant we just keep track of the current index so the old natives would just work and introduce a new API as well in case someone wants more freedom
That's one possibility I have in mind, reusing the old write natives if possible and just keep track of current field index, doing them linearly. Regardless, new natives will definitely be added.

Quote:
Originally Posted by Zephyrus View Post
btw i missed that enum but i can see it now, how do you do read that part of the memory/file on the fly?
You'll have to excuse the mess as this is still test code...
Code:
const int ENUM_NAME_OFFSET = 6;
const int FILE_NAME_OFFSET = 10;
///////

	const google::protobuf::EnumDescriptor *pEnumDesc = ECstrike15UserMessages_descriptor();
	const google::protobuf::FileDescriptor *pFileDesc = ECstrike15UserMessages_descriptor()->file();
	for( int i = 0; i < pEnumDesc->value_count(); ++i )
	{
		for( int j = 0; j < pFileDesc->message_type_count(); ++j )
		{
			if( pEnumDesc->value(i)->name().length() >= ENUM_NAME_OFFSET
				&& pFileDesc->message_type(j)->name().length() >= FILE_NAME_OFFSET
				&& !pEnumDesc->value(i)->name().substr(ENUM_NAME_OFFSET).compare(pFileDesc->message_type(j)->name().substr(FILE_NAME_OFFSET) ) )
			{
				const char *pszName = pFileDesc->message_type(j)->name().substr(FILE_NAME_OFFSET).c_str();
				UserMessageInfo pInfo ( pEnumDesc->value(i)->number(), pFileDesc->message_type(j) );
				umtypes.Insert( pszName, pInfo );
				break;
			}
		}
	}
psychonic is offline
Zephyrus
Cool Pig B)
Join Date: Jun 2010
Location: Hungary
Old 12-25-2012 , 22:59   Re: Newest CS:GO update crashing with SourceMod?
#102

Quote:
Originally Posted by psychonic View Post
That's one possibility I have in mind, reusing the old write natives if possible and just keep track of current field index, doing them linearly. Regardless, new natives will definitely be added.



You'll have to excuse the mess as this is still test code...
Code:
const int ENUM_NAME_OFFSET = 6;
const int FILE_NAME_OFFSET = 10;
///////

    const google::protobuf::EnumDescriptor *pEnumDesc = ECstrike15UserMessages_descriptor();
    const google::protobuf::FileDescriptor *pFileDesc = ECstrike15UserMessages_descriptor()->file();
    for( int i = 0; i < pEnumDesc->value_count(); ++i )
    {
        for( int j = 0; j < pFileDesc->message_type_count(); ++j )
        {
            if( pEnumDesc->value(i)->name().length() >= ENUM_NAME_OFFSET
                && pFileDesc->message_type(j)->name().length() >= FILE_NAME_OFFSET
                && !pEnumDesc->value(i)->name().substr(ENUM_NAME_OFFSET).compare(pFileDesc->message_type(j)->name().substr(FILE_NAME_OFFSET) ) )
            {
                const char *pszName = pFileDesc->message_type(j)->name().substr(FILE_NAME_OFFSET).c_str();
                UserMessageInfo pInfo ( pEnumDesc->value(i)->number(), pFileDesc->message_type(j) );
                umtypes.Insert( pszName, pInfo );
                break;
            }
        }
    }
PHP Code:
ECstrike15UserMessages_descriptor() 
i assume this is already from the compiled .proto file, i meant reading the .proto itself from the memory/binary dynamically

edit: or maybe this:

Quote:
__ZN12_GLOBAL__N_134ECstrike15UserMessages_de scriptor_E
__________________
Taking private C++/PHP/SourcePawn requests, PM me.

Last edited by Zephyrus; 12-25-2012 at 23:04.
Zephyrus is offline
psychonic

BAFFLED
Join Date: May 2008
Old 12-25-2012 , 23:06   Re: Newest CS:GO update crashing with SourceMod?
#103

Quote:
Originally Posted by Zephyrus View Post
PHP Code:
ECstrike15UserMessages_descriptor() 
i assume this is already from the compiled .proto file, i meant reading the .proto itself from the memory/binary dynamically
Yes, that's from the compiled proto, but it may be possible to just sigscan an address to the version of it in valve's bin.

Right now, I'm just trying to get something that works. It can be improved later.
psychonic is offline
Zephyrus
Cool Pig B)
Join Date: Jun 2010
Location: Hungary
Old 12-25-2012 , 23:08   Re: Newest CS:GO update crashing with SourceMod?
#104

Quote:
Originally Posted by psychonic View Post
Yes, that's from the compiled proto, but it may be possible to just sigscan an address to the version of it in valve's bin.

Right now, I'm just trying to get something that works. It can be improved later.
yeah i was assuming it would end up being a sigscan, anyway nice work
__________________
Taking private C++/PHP/SourcePawn requests, PM me.

Last edited by Zephyrus; 12-25-2012 at 23:10.
Zephyrus is offline
Jargon
SourceMod Donor
Join Date: Jun 2012
Location: Sydney, Australia
Old 12-25-2012 , 23:13   Re: Newest CS:GO update crashing with SourceMod?
#105

This hot mess just reminded me how hard you guys work and pull together when Valve pulls out their illustrious red carpet from under everything, so I've donated again.

Thanks for the hard work!
Jargon is offline
VPPGamingNetwork
Veteran Member
Join Date: Sep 2012
Location: Japan
Old 12-25-2012 , 23:20   Re: Newest CS:GO update crashing with SourceMod?
#106

do you guys get any of the money we donated? or the owner of this site does?
VPPGamingNetwork is offline
asherkin
SourceMod Developer
Join Date: Aug 2009
Location: OnGameFrame()
Old 12-25-2012 , 23:24   Re: Newest CS:GO update crashing with SourceMod?
#107

Quote:
Originally Posted by whosurdaddy972 View Post
do you guys get any of the money we donated? or the owner of this site does?
The donations go primarily towards hosting costs and paying for the site hardware, along with purchasing new Source games for the developers for reverse engineering or other development software as-needed.
__________________
asherkin is offline
Zephyrus
Cool Pig B)
Join Date: Jun 2010
Location: Hungary
Old 12-25-2012 , 23:38   Re: Newest CS:GO update crashing with SourceMod?
#108

Quote:
Originally Posted by whosurdaddy972 View Post
do you guys get any of the money we donated? or the owner of this site does?
its used to bet on races like this
http://www.youtube.com/watch?v=s5EwZmPLrhI

no offense
__________________
Taking private C++/PHP/SourcePawn requests, PM me.

Last edited by Zephyrus; 12-25-2012 at 23:40.
Zephyrus is offline
wangningyu
Member
Join Date: Dec 2011
Location: China.GuangDong
Old 12-26-2012 , 00:05   Re: Newest CS:GO update crashing with SourceMod?
#109

is annbody know how to fix ?

thans !
__________________
One Code , One Dream !
wangningyu is offline
Jargon
SourceMod Donor
Join Date: Jun 2012
Location: Sydney, Australia
Old 12-26-2012 , 00:12   Re: Newest CS:GO update crashing with SourceMod?
#110

Quote:
Originally Posted by wangningyu View Post
is annbody know how to fix ?

thans !
As you can read above, they're working on it so just be patient.
Jargon is offline
Closed Thread



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 12:50.


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