… | |
… | |
311 | // the need for this function can be explained |
311 | // the need for this function can be explained |
312 | // by load_object not returning the object |
312 | // by load_object not returning the object |
313 | void |
313 | void |
314 | player::set_object (object *op) |
314 | player::set_object (object *op) |
315 | { |
315 | { |
316 | ob = op; |
316 | ob = observe = op; |
317 | ob->contr = this; /* this aren't yet in archetype */ |
317 | ob->contr = this; /* this aren't yet in archetype */ |
318 | |
318 | |
319 | ob->speed = 1.0f; |
319 | ob->speed = 1.0f; |
320 | ob->speed_left = 0.5f; |
320 | ob->speed_left = 0.5f; |
321 | |
321 | |
322 | ob->direction = 5; /* So player faces south */ |
322 | ob->direction = 5; /* So player faces south */ |
|
|
323 | } |
|
|
324 | |
|
|
325 | void |
|
|
326 | player::set_observe (object *op) |
|
|
327 | { |
|
|
328 | observe = op ? op : ob; |
323 | } |
329 | } |
324 | |
330 | |
325 | player::player () |
331 | player::player () |
326 | { |
332 | { |
327 | /* There are some elements we want initialised to non zero value - |
333 | /* There are some elements we want initialised to non zero value - |