Merge branch 'development' of https://github.com/GarageGames/Torque3D into memberMess

# Conflicts:
#	Engine/source/console/consoleFunctions.cpp
This commit is contained in:
Azaezel 2018-03-28 15:42:34 -05:00
commit cbce2ee805
154 changed files with 2950 additions and 705 deletions

View file

@ -446,8 +446,9 @@ bool afxMagicMissileData::onAdd()
Vector<char*> dataBlocks(__FILE__, __LINE__);
// make a copy of points_string
char* tokCopy = new char[dStrlen(wiggle_axis_string) + 1];
dStrcpy(tokCopy, wiggle_axis_string);
dsize_t tokCopyLen = dStrlen(wiggle_axis_string) + 1;
char* tokCopy = new char[tokCopyLen];
dStrcpy(tokCopy, wiggle_axis_string, tokCopyLen);
// extract tokens one by one, adding them to dataBlocks
char* currTok = dStrtok(tokCopy, " \t");

View file

@ -908,7 +908,7 @@ ConsoleFunction(echoThru, const char*, 2, 0, "(string passthru, string text...)"
char *ret = Con::getReturnBuffer(len + 1);
ret[0] = 0;
for(i = 2; i < argc; i++)
dStrcat(ret, argv[i]);
dStrcat(ret, argv[i], len + 1);
Con::printf("%s -- [%s]", ret, argv[1].getStringValue());
ret[0] = 0;
@ -928,7 +928,7 @@ ConsoleFunction(warnThru, const char*, 2, 0, "(string passthru, string text...)"
char *ret = Con::getReturnBuffer(len + 1);
ret[0] = 0;
for(i = 2; i < argc; i++)
dStrcat(ret, argv[i]);
dStrcat(ret, argv[i], len + 1);
Con::warnf("%s -- [%s]", ret, argv[1].getStringValue());
ret[0] = 0;
@ -948,7 +948,7 @@ ConsoleFunction(errorThru, const char*, 2, 0, "(string passthru, string text...)
char *ret = Con::getReturnBuffer(len + 1);
ret[0] = 0;
for(i = 2; i < argc; i++)
dStrcat(ret, argv[i]);
dStrcat(ret, argv[i], len + 1);
Con::errorf("%s -- [%s]", ret, argv[1].getStringValue());
ret[0] = 0;

View file

@ -184,7 +184,7 @@ void afxAudioBank::packData(BitStream* stream)
if(!mFilename)
buffer[0] = 0;
else
dStrcpy(buffer, mFilename);
dStrcpy(buffer, mFilename, 256);
stream->writeString(buffer);
*/

View file

@ -141,8 +141,9 @@ bool afxParticleEmitterData::onAdd()
if (tpaths_string != ST_NULLSTRING)
{
Vector<char*> dataBlocks(__FILE__, __LINE__);
char* tokCopy = new char[dStrlen(tpaths_string) + 1];
dStrcpy(tokCopy, tpaths_string);
dsize_t tokCopyLen = dStrlen(tpaths_string) + 1;
char* tokCopy = new char[tokCopyLen];
dStrcpy(tokCopy, tpaths_string, tokCopyLen);
char* currTok = dStrtok(tokCopy, " \t");
while (currTok != NULL)
@ -467,8 +468,9 @@ bool afxParticleEmitterPathData::onAdd()
if (epaths_string != ST_NULLSTRING)
{
Vector<char*> dataBlocks(__FILE__, __LINE__);
char* tokCopy = new char[dStrlen(epaths_string) + 1];
dStrcpy(tokCopy, epaths_string);
dsize_t tokCopyLen = dStrlen(epaths_string) + 1;
char* tokCopy = new char[tokCopyLen];
dStrcpy(tokCopy, epaths_string, tokCopyLen);
char* currTok = dStrtok(tokCopy, " \t");
while (currTok != NULL)
@ -552,8 +554,9 @@ void afxParticleEmitterPathData::onPerformSubstitutions()
if (epaths_string != ST_NULLSTRING)
{
Vector<char*> dataBlocks(__FILE__, __LINE__);
char* tokCopy = new char[dStrlen(epaths_string) + 1];
dStrcpy(tokCopy, epaths_string);
dsize_t tokCopyLen = dStrlen(epaths_string) + 1;
char* tokCopy = new char[tokCopyLen];
dStrcpy(tokCopy, epaths_string, tokCopyLen);
char* currTok = dStrtok(tokCopy, " \t");
while (currTok != NULL)

View file

@ -272,10 +272,10 @@ void afxEA_PhraseEffect::trigger_new_phrase()
if (phrase_fx_data->on_trig_cmd != ST_NULLSTRING)
{
char obj_str[32];
dStrcpy(obj_str, Con::getIntArg(choreographer->getId()));
dStrcpy(obj_str, Con::getIntArg(choreographer->getId()), 32);
char index_str[32];
dStrcpy(index_str, Con::getIntArg(group_index));
dStrcpy(index_str, Con::getIntArg(group_index), 32);
char buffer[1024];
char* b = buffer;
@ -382,4 +382,4 @@ bool afxEA_PhraseEffectDesc::requiresStop(const afxEffectWrapperData* ew, const
return (timing.lifetime < 0);
}
//~~~~~~~~~~~~~~~~~~~~//~~~~~~~~~~~~~~~~~~~~//~~~~~~~~~~~~~~~~~~~~//~~~~~~~~~~~~~~~~~~~~~//
//~~~~~~~~~~~~~~~~~~~~//~~~~~~~~~~~~~~~~~~~~//~~~~~~~~~~~~~~~~~~~~//~~~~~~~~~~~~~~~~~~~~~//

View file

@ -194,7 +194,7 @@ char* afxRPGMagicSpellData::fmt_placeholder_desc(char* buffer, int len) const
{
char pack_str[32];
if (source_pack == ST_NULLSTRING)
dStrcpy(pack_str, "unknown");
dStrcpy(pack_str, "unknown", 32);
else
dSprintf(pack_str, 32, "%s", source_pack);
@ -225,9 +225,9 @@ char* afxRPGMagicSpellData::formatDesc(char* buffer, int len) const
{
if (spell_target != TARGET_NOTHING)
{
dStrcpy(target_str, _afxRPGMagicSpell_TargetType::_sEnumTable[i].mName);
dStrcpy(target_str, _afxRPGMagicSpell_TargetType::_sEnumTable[i].mName, 32);
if (spell_target != TARGET_FREE && target_optional)
dStrcat(target_str, " (opt)");
dStrcat(target_str, " (opt)", 32);
}
break;
}
@ -245,13 +245,13 @@ char* afxRPGMagicSpellData::formatDesc(char* buffer, int len) const
char casting_str[32];
if (casting_dur <= 0)
dStrcpy(casting_str, "instant");
dStrcpy(casting_str, "instant", 32);
else
dSprintf(casting_str, 32, "%.1f sec cast", casting_dur);
char pack_str[32];
if (source_pack == ST_NULLSTRING)
dStrcpy(pack_str, "unknown");
dStrcpy(pack_str, "unknown", 32);
else
dSprintf(pack_str, 32, "%s", source_pack);

View file

@ -171,10 +171,11 @@ void afxSpellButton::setBitmap(const char *name, bool placeholder)
if (placeholder)
{
dStrcpy(buffer, name);
dStrcpy(buffer, name, 1024);
S32 pLen = 1024 - dStrlen(buffer);
p = buffer + dStrlen(buffer);
dStrcpy(p, "_i");
dStrcpy(p, "_i", pLen);
mTextureInactive.set(buffer, COOLDOWN_PROFILE);
mTextureNormal = mTextureInactive;
mTextureHilight = mTextureInactive;
@ -183,19 +184,20 @@ void afxSpellButton::setBitmap(const char *name, bool placeholder)
}
else
{
dStrcpy(buffer, name);
dStrcpy(buffer, name, 1024);
S32 pLen = 1024 - dStrlen(buffer);
p = buffer + dStrlen(buffer);
dStrcpy(p, "_n");
dStrcpy(p, "_n", pLen);
mTextureNormal.set(buffer, COOLDOWN_PROFILE);
dStrcpy(p, "_h");
dStrcpy(p, "_h", pLen);
mTextureHilight.set(buffer, COOLDOWN_PROFILE);
if (!mTextureHilight)
mTextureHilight = mTextureNormal;
dStrcpy(p, "_d");
dStrcpy(p, "_d", pLen);
mTextureDepressed.set(buffer, COOLDOWN_PROFILE);
if (!mTextureDepressed)
mTextureDepressed = mTextureHilight;
dStrcpy(p, "_i");
dStrcpy(p, "_i", pLen);
mTextureInactive.set(buffer, COOLDOWN_PROFILE);
if (!mTextureInactive)
mTextureInactive = mTextureNormal;

View file

@ -194,8 +194,9 @@ bool afxXM_PathConformData::onAdd()
if (paths_string != ST_NULLSTRING)
{
Vector<char*> dataBlocks(__FILE__, __LINE__);
char* tokCopy = new char[dStrlen(paths_string) + 1];
dStrcpy(tokCopy, paths_string);
dsize_t tokCopyLen = dStrlen(paths_string) + 1;
char* tokCopy = new char[tokCopyLen];
dStrcpy(tokCopy, paths_string, tokCopyLen);
char* currTok = dStrtok(tokCopy, " \t");
while (currTok != NULL)