Crystal Space
Welcome, Guest. Please login or register.
July 25, 2014, 09:23:15 am

Login with username, password and session length
Search:     Advanced search
9005 Posts in 2043 Topics by 8230 Members
Latest Member: Eleneenri
* Home Help Search Login Register
+  Crystal Space
|-+  Associate Projects
| |-+  CEL Discussion
| | |-+  segfault with pcspawn
« previous next »
Pages: [1] Print
Author Topic: segfault with pcspawn  (Read 2881 times)
ghaz
Newbie
*
Posts: 20


View Profile
« on: September 22, 2006, 08:58:55 am »

I'm trying to edit walktut to make the monkey respawn every couple of seconds. The following code was added to the LoadLevel() function in app.cpp and causes a segfault at the moment the spawn occurs.

Code:
   csRef<iPcSpawn> pcspawn = CEL_QUERY_PROPCLASS_ENT(level_entity, iPcSpawn);
   pcspawn->AddEntityType(0.1,"badone",bl,"badone_behave",0,0);
   csVector3 spawnpos(9,3,8);
   pcspawn->AddSpawnPosition(spawnpos, 0.0, "Scene");
   pcspawn->SetTiming(true, true, 10000, 20000);

I usually like to figure stuff like this out on my own, but it has been a couple of days and I still can't see anything wrong. (should probably mention that although my c++ "skills" are slightly average, I still don't understand most of the crystal space and cel concepts)

Any help would be greatly appreciated

thanks
george
Logged
jorrit
Administrator
Hero Member
*****
Posts: 1706


View Profile
« Reply #1 on: September 22, 2006, 09:05:16 am »

The problem is most likely that you're the first person trying to use pcspawn. Wouldn't be surprising to me if there are still a lot of bugs in it. I will try to find time to look at it later though.

Greetings,
Logged
ghaz
Newbie
*
Posts: 20


View Profile
« Reply #2 on: September 22, 2006, 09:33:11 am »

I forgot to mention that I'm using CS revision 25269 and CEL revision 2203.

pcspawn looks like it will be a very handy propclass. I'm only now starting to understand how the CEL property classes work. The more I learn, the more I realise how much thought must have been put into the design. Everything just fits together perfectly.

thanks for the quick reply
Logged
Pages: [1] Print 
« previous next »
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.2 | SMF © 2006-2007, Simple Machines LLC Valid XHTML 1.0! Valid CSS!
Page created in 4.529 seconds with 16 queries.