From abdc28945fb26e6264dcc240ce9566b346182e73 Mon Sep 17 00:00:00 2001 From: kervala Date: Sat, 4 Jun 2011 13:25:58 +0200 Subject: [PATCH] Changed: #142 Replace atoi and sscanf by fromString when it's possible --- code/ryzom/server/src/ai_service/ai_outpost.cpp | 5 ++++- .../server/src/ai_service/ai_script_comp.cpp | 8 ++++++-- code/ryzom/server/src/ai_service/ai_spire.cpp | 5 ++++- .../src/ai_service/generic_logic_action.cpp | 16 ++++++++-------- .../player_manager/cdb_leaf.cpp | 6 ++++-- 5 files changed, 26 insertions(+), 14 deletions(-) diff --git a/code/ryzom/server/src/ai_service/ai_outpost.cpp b/code/ryzom/server/src/ai_service/ai_outpost.cpp index fb2090617..0ef71b2ee 100644 --- a/code/ryzom/server/src/ai_service/ai_outpost.cpp +++ b/code/ryzom/server/src/ai_service/ai_outpost.cpp @@ -1271,7 +1271,10 @@ NLMISC_COMMAND(outpostSpawnSquad, "Spawns a squad in an outpost", " 6 ) - respawnTimeGC = atoi( args[6].c_str() ) * 10; + { + NLMISC::fromString(args[6], respawnTimeGC); + respawnTimeGC *= 10; + } for (size_t i=0; i<5; ++i) if (args[i]=="") diff --git a/code/ryzom/server/src/ai_service/ai_script_comp.cpp b/code/ryzom/server/src/ai_service/ai_script_comp.cpp index 0209eeec0..63f127483 100644 --- a/code/ryzom/server/src/ai_service/ai_script_comp.cpp +++ b/code/ryzom/server/src/ai_service/ai_script_comp.cpp @@ -237,7 +237,9 @@ public: if (params.size()!=2) throw ReadFightActionException("EVERY_SEC Needs 2 Params: