mirror of
https://gitea.wildfiregames.com/0ad/0ad.git
synced 2026-07-24 17:13:08 +00:00
# General tidying.
Encryption: Deleted, just in case anyone was ever tempted to use it. debug_warn: Removed redundant quotes around message. oglCheck: Added error number to displayed messages, to help when debugging errors. Simulation: Fixed syntax confusion. Entity: Preserve unit ID across entity-template changes (e.g. upgrades). Atlas: Made some floating-point code less dodgy. Support number keys to change player while placing units. This was SVN commit r4814.
This commit is contained in:
@@ -209,11 +209,8 @@ JSBool CEntity::Construct( JSContext* cx, JSObject* UNUSED(obj), uint argc, jsva
|
||||
|
||||
jsval CEntity::ToString( JSContext* cx, uintN UNUSED(argc), jsval* UNUSED(argv) )
|
||||
{
|
||||
wchar_t buffer[256];
|
||||
swprintf( buffer, 256, L"[object Entity: %ls]", m_base->m_Tag.c_str() );
|
||||
buffer[255] = 0;
|
||||
utf16string str16(buffer, buffer+wcslen(buffer));
|
||||
return( STRING_TO_JSVAL( JS_NewUCStringCopyZ( cx, str16.c_str() ) ) );
|
||||
CStrW name( L"[object Entity: " + m_base->m_Tag + L"]" );
|
||||
return( STRING_TO_JSVAL( JS_NewUCStringCopyZ( cx, name.utf16().c_str() ) ) );
|
||||
}
|
||||
|
||||
jsval CEntity::JSI_GetPlayer()
|
||||
|
||||
Reference in New Issue
Block a user