16
0
mirror of https://github.com/MaSzyna-EU07/maszyna.git synced 2026-07-19 14:39:18 +02:00

Usunięte out_of_range z zapisu e3d i szukania eventow skanowanych

This commit is contained in:
firleju
2017-01-26 06:14:45 +01:00
parent 4ad5ac1b51
commit 0900d93227
2 changed files with 210 additions and 208 deletions

View File

@@ -2234,8 +2234,7 @@ TEvent * TGround::FindEventScan(const string &asEventName)
TEvent *e = (TEvent *)sTracks->Find(0, asEventName.c_str()); // wyszukiwanie w drzewie eventów
if (e)
return e; // jak istnieje, to w porządku
if (asEventName.substr(asEventName.length() - 4, 5) ==
":scan") // jeszcze może być event niejawny
if (asEventName.rfind(":scan") != std::string::npos) // jeszcze może być event niejawny
{ // no to szukamy komórki pamięci o nazwie zawartej w evencie
string n = asEventName.substr(0, asEventName.length() - 5); // do dwukropka
if (sTracks->Find(TP_MEMCELL, n.c_str())) // jeśli jest takowa komórka pamięci